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

[elastic-agent] in windows got some flakiness tests for TestActionStore/TestReplaceOrRollbackStore/TestDiskStore #19789

Closed
v1v opened this issue Jul 9, 2020 · 4 comments · Fixed by #19793
Assignees
Labels
flaky-test Unstable or unreliable test cases.

Comments

@v1v
Copy link
Member

v1v commented Jul 9, 2020

Flaky Test

Stack Trace

C:\Users\jenkins\workspace\Beats_beats-windows-mbp_PR-19773\src\github.com\elastic\beats\x-pack\elastic-agent>mage  build unitTest 
14:42:59  go version go1.13.10 windows/amd64

14:44:22  --- FAIL: TestActionStore (0.04s)
14:44:22      --- PASS: TestActionStore/action_returns_empty_when_no_action_is_saved_on_disk (0.00s)
14:44:22      --- PASS: TestActionStore/will_discard_silently_unknown_action (0.00s)
14:44:22      --- FAIL: TestActionStore/can_save_to_disk_known_action_type (0.01s)
14:44:22          action_store_test.go:75: 
14:44:22              	Error Trace:	action_store_test.go:75
14:44:22              	            				action_store_test.go:29
14:44:22              	Error:      	Received unexpected error:
14:44:22              	            	could not replace target file C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store379160453\config.yml: rename C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store379160453\config.yml.tmp C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store379160453\config.yml: Access is denied.
14:44:22              	Test:       	TestActionStore/can_save_to_disk_known_action_type
14:44:22      --- FAIL: TestActionStore/when_we_ACK_we_save_to_disk (0.01s)
14:44:22          action_store_test.go:101: 
14:44:22              	Error Trace:	action_store_test.go:101
14:44:22              	            				action_store_test.go:29
14:44:22              	Error:      	Received unexpected error:
14:44:22              	            	could not replace target file C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store932123936\config.yml: rename C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store932123936\config.yml.tmp C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store932123936\config.yml: Access is denied.
14:44:22              	Test:       	TestActionStore/when_we_ACK_we_save_to_disk

14:44:29  --- FAIL: TestReplaceOrRollbackStore (0.03s)
14:44:29      --- FAIL: TestReplaceOrRollbackStore/when_the_save_is_successful_with_target_and_source_don't_match (0.02s)
14:44:29          storage_test.go:56: 
14:44:29              	Error Trace:	storage_test.go:56
14:44:29              	Error:      	Not equal: 
14:44:29              	            	expected: 0x180
14:44:29              	            	actual  : 0x1b6
14:44:29              	Test:       	TestReplaceOrRollbackStore/when_the_save_is_successful_with_target_and_source_don't_match
14:44:29      --- PASS: TestReplaceOrRollbackStore/when_save_is_not_successful (0.00s)
14:44:29      --- FAIL: TestReplaceOrRollbackStore/when_save_is_successful_with_target_and_source_content_match (0.00s)
14:44:29          storage_test.go:109: 
14:44:29              	Error Trace:	storage_test.go:109
14:44:29              	Error:      	Not equal: 
14:44:29              	            	expected: 0x180
14:44:29              	            	actual  : 0x1b6
14:44:29              	Test:       	TestReplaceOrRollbackStore/when_save_is_successful_with_target_and_source_content_match
...
14:44:29  --- FAIL: TestDiskStore (0.04s)
14:44:29      --- FAIL: TestDiskStore/when_the_target_file_already_exists (0.04s)
14:44:29          storage_test.go:142: 
14:44:29              	Error Trace:	storage_test.go:142
14:44:29              	Error:      	Not equal: 
14:44:29              	            	expected: 0x180
14:44:29              	            	actual  : 0x1b6
14:44:29              	Test:       	TestDiskStore/when_the_target_file_already_exists
14:44:29      --- FAIL: TestDiskStore/when_the_target_do_no_exist (0.00s)
14:44:29          storage_test.go:165: 
14:44:29              	Error Trace:	storage_test.go:165
14:44:29              	Error:      	Not equal: 
14:44:29              	            	expected: 0x180
14:44:29              	            	actual  : 0x1b6
14:44:29              	Test:       	TestDiskStore/when_the_target_do_no_exist
14:44:29      --- FAIL: TestDiskStore/return_an_io.ReadCloser_to_the_target_file (0.00s)
14:44:29          storage_test.go:185: 
14:44:29              	Error Trace:	storage_test.go:185
14:44:29              	Error:      	Not equal: 
14:44:29              	            	expected: 0x180
14:44:29              	            	actual  : 0x1b6
14:44:29              	Test:       	TestDiskStore/return_an_io.ReadCloser_to_the_target_file
@v1v v1v added flaky-test Unstable or unreliable test cases. Team:Ingest Management labels Jul 9, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@blakerouse
Copy link
Contributor

Its not flaky, its broken! ;-)

@v1v
Copy link
Member Author

v1v commented Jul 13, 2020

I'm afraid I still see a couple of test failures:

 === RUN   TestActionStore/can_save_to_disk_known_action_type
     TestActionStore/can_save_to_disk_known_action_type: action_store_test.go:75: 
         	Error Trace:	action_store_test.go:75
         	            				action_store_test.go:29
         	Error:      	Received unexpected error:
         	            	could not replace target file C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store284173813\config.yml: rename C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store284173813\config.yml.tmp C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store284173813\config.yml: Access is denied.
         	Test:       	TestActionStore/can_save_to_disk_known_action_type
 === RUN   TestActionStore/when_we_ACK_we_save_to_disk
     TestActionStore/when_we_ACK_we_save_to_disk: action_store_test.go:101: 
         	Error Trace:	action_store_test.go:101
         	            				action_store_test.go:29
         	Error:      	Received unexpected error:
         	            	could not replace target file C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store091744976\config.yml: rename C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store091744976\config.yml.tmp C:\Users\JENKIN~1.PAC\AppData\Local\Temp\action-store091744976\config.yml: Access is denied.
         	Test:       	TestActionStore/when_we_ACK_we_save_to_disk
 --- FAIL: TestActionStore (0.04s)
     --- PASS: TestActionStore/action_returns_empty_when_no_action_is_saved_on_disk (0.00s)
     --- PASS: TestActionStore/will_discard_silently_unknown_action (0.00s)
     --- FAIL: TestActionStore/can_save_to_disk_known_action_type (0.01s)
     --- FAIL: TestActionStore/when_we_ACK_we_save_to_disk (0.01s)

Build log details -> here
OS version -> Windows-2012, Windows-2019 and Windows-2016 (I guess it happens for all the windows versions anyway)
Build command -> mage build unitTest

@v1v v1v reopened this Jul 13, 2020
@ph ph assigned ph and michalpristas and unassigned ph Jul 13, 2020
@michalpristas
Copy link
Contributor

closing as a duplicate of #19919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Unstable or unreliable test cases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants