(t *testing.T)
| 639 | } |
| 640 | |
| 641 | func TestPartitionOffsetManagerNextOffset(t *testing.T) { |
| 642 | om, testClient, broker, coordinator := initOffsetManager(t, 0) |
| 643 | defer broker.Close() |
| 644 | defer coordinator.Close() |
| 645 | pom := initPartitionOffsetManager(t, om, coordinator, 5, "test_meta") |
| 646 | |
| 647 | offset, meta := pom.NextOffset() |
| 648 | if offset != 5 { |
| 649 | t.Errorf("Expected offset 5. Actual: %v", offset) |
| 650 | } |
| 651 | if meta != "test_meta" { |
| 652 | t.Errorf("Expected metadata \"test_meta\". Actual: %q", meta) |
| 653 | } |
| 654 | |
| 655 | safeClose(t, pom) |
| 656 | safeClose(t, om) |
| 657 | safeClose(t, testClient) |
| 658 | } |
| 659 | |
| 660 | func TestPartitionOffsetManagerResetOffset(t *testing.T) { |
| 661 | om, testClient, broker, coordinator := initOffsetManager(t, 0) |
nothing calls this directly
no test coverage detected