(t *testing.T, conn *Conn)
| 742 | } |
| 743 | |
| 744 | func testConnFindCoordinator(t *testing.T, conn *Conn) { |
| 745 | groupID := makeGroupID() |
| 746 | |
| 747 | for attempt := 0; attempt < 10; attempt++ { |
| 748 | if attempt != 0 { |
| 749 | time.Sleep(time.Millisecond * 50) |
| 750 | } |
| 751 | response, err := conn.findCoordinator(findCoordinatorRequestV0{CoordinatorKey: groupID}) |
| 752 | if err != nil { |
| 753 | if errors.Is(err, GroupCoordinatorNotAvailable) { |
| 754 | continue |
| 755 | } |
| 756 | |
| 757 | t.Fatalf("bad findCoordinator: %s", err) |
| 758 | } |
| 759 | |
| 760 | if response.Coordinator.NodeID == 0 { |
| 761 | t.Errorf("bad NodeID") |
| 762 | } |
| 763 | if response.Coordinator.Host == "" { |
| 764 | t.Errorf("bad Host") |
| 765 | } |
| 766 | if response.Coordinator.Port == 0 { |
| 767 | t.Errorf("bad Port") |
| 768 | } |
| 769 | return |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | func testConnJoinGroupInvalidGroupID(t *testing.T, conn *Conn) { |
| 774 | _, err := conn.joinGroup(joinGroupRequest{}) |
nothing calls this directly
no test coverage detected
searching dependent graphs…