Skip to content

Commit 2554211

Browse files
markmandelRobert Bailey
andauthored
v2: Flaky TestFleetRecreateGameServers fix. (agones-dev#2539)
Oops, need to skip the assert.Equals(...) on the response when there is no GameServer, as otherwise it will fail, since no response was received. Co-authored-by: Robert Bailey <robertbailey@google.com>
1 parent e7320bf commit 2554211

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎test/e2e/fleet_test.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,9 +1224,10 @@ func TestFleetRecreateGameServers(t *testing.T) {
12241224
// if we didn't get a response because the GameServer has gone away, then the packet dropped on the return,
12251225
// but we're in the state we want, so we can ignore that we didn't get a response.
12261226
_, gsErr := framework.AgonesClient.AgonesV1().GameServers(gs.ObjectMeta.Namespace).Get(ctx, gs.ObjectMeta.Name, metav1.GetOptions{})
1227-
if !k8serrors.IsNotFound(gsErr) {
1228-
t.Fatalf("Could not message GameServer: %v", err)
1227+
if k8serrors.IsNotFound(gsErr) {
1228+
continue
12291229
}
1230+
t.Fatalf("Could not message GameServer: %v", err)
12301231
}
12311232

12321233
assert.Equal(t, "ACK: EXIT\n", reply)

0 commit comments

Comments
 (0)