Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky: unit test TestSDKServerAddListValue #3622

Closed
ashutosji opened this issue Jan 31, 2024 · 2 comments · Fixed by #3627
Closed

Flaky: unit test TestSDKServerAddListValue #3622

ashutosji opened this issue Jan 31, 2024 · 2 comments · Fixed by #3627
Labels
kind/bug These are bugs.

Comments

@ashutosji
Copy link
Contributor

What happened:

Step #20 - "tests": --- FAIL: TestSDKServerAddListValue (31.98s)
Step #20 - "tests":     --- FAIL: TestSDKServerAddListValue/Add_multiple_values_past_capacity (1.12s)
Step #20 - "tests":         sdkserver_test.go:1477: 
Step #20 - "tests":             	Error Trace:	/go/src/agones.dev/agones/pkg/sdkserver/sdkserver_test.go:1477
Step #20 - "tests":             	Error:      	Not equal: 
Step #20 - "tests":             	            	expected: v1.ListStatus{Capacity:10, Values:[]string{"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"}}
Step #20 - "tests":             	            	actual  : v1.ListStatus{Capacity:10, Values:[]string{"one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}}
Step #20 - "tests":             	            	
Step #20 - "tests":             	            	Diff:
Step #20 - "tests":             	            	--- Expected
Step #20 - "tests":             	            	+++ Actual
Step #20 - "tests":             	            	@@ -2,3 +2,3 @@
Step #20 - "tests":             	            	  Capacity: (int64) 10,
Step #20 - "tests":             	            	- Values: ([]string) (len=10) {
Step #20 - "tests":             	            	+ Values: ([]string) (len=9) {
Step #20 - "tests":             	            	   (string) (len=3) "one",
Step #20 - "tests":             	            	@@ -11,4 +11,3 @@
Step #20 - "tests":             	            	   (string) (len=5) "eight",
Step #20 - "tests":             	            	-  (string) (len=4) "nine",
Step #20 - "tests":             	            	-  (string) (len=3) "ten"
Step #20 - "tests":             	            	+  (string) (len=4) "nine"
Step #20 - "tests":             	            	  }
Step #20 - "tests":             	Test:       	TestSDKServerAddListValue/Add_multiple_values_past_capacity

What you expected to happen:
Tests should pass.

How to reproduce it (as minimally and precisely as possible):
Not entirely sure. Seems to mostly happen in CI, have yet to try and reproduce locally.

Anything else we need to know?:

Environment:

  • Agones version: dev
  • Kubernetes version (use kubectl version): varies
  • Cloud provider or hardware configuration: GKE
  • Install method (yaml/helm): helm
  • Troubleshooting guide log(s): see above what happened section
  • Others: N/A
@ashutosji ashutosji added the kind/bug These are bugs. label Jan 31, 2024
@markmandel
Copy link
Member

Context:

func TestSDKServerAddListValue(t *testing.T) {

@markmandel markmandel changed the title Flaky: e2e TestSDKServerAddListValue Flaky: unit test TestSDKServerAddListValue Feb 1, 2024
@markmandel
Copy link
Member

Three PR's it was reported in:

Weirdly, I've run this on main 200 tiemes and have yet to have it fail. So very odd.

markmandel added a commit to markmandel/agones that referenced this issue Feb 1, 2024
Both unit tests had the same issue - under high load, the workqueue
could process the current data set that was batched for updates,
resulting in non-deterministic test state.

Moving the `sc.Run(...)` operation until only the moment where update
checks are required resolves this issue.

Fixes googleforgames#3625
Fixes googleforgames#3622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants