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

race condition in flux-wreck attach --no-follow test #1459

Closed
grondo opened this issue Apr 13, 2018 · 1 comment
Closed

race condition in flux-wreck attach --no-follow test #1459

grondo opened this issue Apr 13, 2018 · 1 comment

Comments

@grondo
Copy link
Contributor

grondo commented Apr 13, 2018

Oops, I think I wrote an unreliable test for the flux-wreck attach --no-follow sharness test:
Obviously there is a race condition between starting the test and ensuring the output from each task has made it to the kvs before running the attach.

expecting success: 
	flux wreckrun -d -l -n4 sh -c "echo before; sleep 30; echo after" &&
	test_when_finished flux wreck kill $(last_job_id) &&
	run_timeout 5 flux wreck attach --no-follow $(last_job_id) >output.attach-n &&
	cat >expected.attach-n <<-EOF &&
	before
	before
	before
	before
	EOF
	test_cmp expected.attach-n output.attach-n

47
--- expected.attach-n	2018-04-13 17:07:35.014233718 +0000
+++ output.attach-n	2018-04-13 17:07:35.014233718 +0000
@@ -1,4 +1,2 @@
 before
 before
-before
-before
not ok 47 - wreck: attach --no-follow works
@grondo
Copy link
Contributor Author

grondo commented Apr 13, 2018

Hm, probably the easiest fix here is to retry flux-wreck attach --no-follow until we get all 4 expected lines. We want to not only test that --no-follow doesn't block/hang, but we do want to make sure it gets the expected lines from all tasks that already written data to their kz streams...

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