Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion compliance/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ func SecondClient(c *fluent.GRIBIClient) *secondClient {
// currently ALL_PRIMARY and an election ID are reported as an error.
func TestUnsupportedElectionParams(c *fluent.GRIBIClient, t testing.TB, _ ...TestOpt) {
defer electionID.Inc()
c.Connection().WithInitialElectionID(electionID.Load(), 0).WithRedundancyMode(fluent.AllPrimaryClients)
c.Connection().WithRedundancyMode(fluent.AllPrimaryClients)
c.Start(context.Background(), t)
defer c.Stop(t)
c.StartSending(context.Background(), t)

// Send an updated election ID, since the ALL_PRIMARY call above will not send the
// election ID explicitly.
c.Modify().UpdateElectionID(t, electionID.Load(), 0)

err := awaitTimeout(context.Background(), c, t, time.Minute)
if err == nil {
t.Fatalf("did not get expected error from server, got: nil")
Expand Down