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 package tests #970

Open
GabrielNagy opened this issue Apr 24, 2024 · 2 comments
Open

☔ Flaky package tests #970

GabrielNagy opened this issue Apr 24, 2024 · 2 comments

Comments

@GabrielNagy
Copy link
Contributor

GabrielNagy commented Apr 24, 2024

This is an umbrella issue that will be updated with flaky / transient test failures as we notice them. A test is considered flaky if it passes most of the time but sometimes fails due to race conditions, runner slowness, solar eclipses etc. The tests pass on re-runs and we then forget about them, until they surface again. So, let's keep a list of them so we have something to check against when we see one. Ideally, if specific failures occur too often we should make an effort to see what's happening and provide a fix.

Let's limit ourselves to one test per comment, with the following template:

- Test name:
- Times seen:
- Comments:
- Logs:

For better tracking, we should aim to update existing comments rather than posting new ones when the same tests are failing.

@GabrielNagy GabrielNagy added bug Something isn't working and removed bug Something isn't working labels Apr 24, 2024
@GabrielNagy
Copy link
Contributor Author

--- FAIL: TestRunScripts (0.00s)
    --- FAIL: TestRunScripts/one_script (0.00s)
        scripts_test.go:279: 
            	Error Trace:	/home/runner/work/adsys/adsys/internal/testutils/files.go:154
            	            				/home/runner/work/adsys/adsys/internal/policies/scripts/scripts_test.go:279
            	Error:      	Not equal: 
            	            	expected: map[string]testutils.treeAttrs{"":testutils.treeAttrs{content:"script3.sh\n", path:"", executable:false}}
            	            	actual  : map[string]testutils.treeAttrs(nil)
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1,8 +1,2 @@
            	            	-(map[string]testutils.treeAttrs) (len=1) {
            	            	- (string) "": (testutils.treeAttrs) {
            	            	-  content: (string) (len=11) "script3.sh\n",
            	            	-  path: (string) "",
            	            	-  executable: (bool) false
            	            	- }
            	            	-}
            	            	+(map[string]testutils.treeAttrs) <nil>
            	            	 
            	Test:       	TestRunScripts/one_script
            	Messages:   	got and expected content differs

@GabrielNagy
Copy link
Contributor Author

--- FAIL: TestRunScripts (0.00s)
    --- FAIL: TestRunScripts/keeps_running_flag_after_non_machine_shutdown (0.04s)
        scripts_test.go:279: 
            	Error Trace:	/home/runner/work/adsys/adsys/internal/testutils/files.go:156
            	            				/home/runner/work/adsys/adsys/internal/policies/scripts/scripts_test.go:279
            	Error:      	Not equal: 
            	            	expected: map[string]testutils.treeAttrs{"":testutils.treeAttrs{content:"script3.sh\nscript1.sh\nscript2.sh\n", path:"", executable:false}}
            	            	actual  : map[string]testutils.treeAttrs{"":testutils.treeAttrs{content:"script1.sh\nscript2.sh\n", path:"", executable:false}}
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -2,3 +2,3 @@
            	            	  (string) "": (testutils.treeAttrs) {
            	            	-  content: (string) (len=33) "script3.sh\nscript1.sh\nscript2.sh\n",
            	            	+  content: (string) (len=22) "script1.sh\nscript2.sh\n",
            	            	   path: (string) "",
            	Test:       	TestRunScripts/keeps_running_flag_after_non_machine_shutdown
            	Messages:   	got and expected content differs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant