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

Fix tests on Windows #5096

Merged
merged 2 commits into from Feb 21, 2022
Merged

Fix tests on Windows #5096

merged 2 commits into from Feb 21, 2022

Conversation

bsideup
Copy link
Member

@bsideup bsideup commented Feb 19, 2022

No description provided.

@bsideup bsideup added this to the next milestone Feb 19, 2022
@bsideup
Copy link
Member Author

bsideup commented Feb 19, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bsideup
Copy link
Member Author

bsideup commented Feb 19, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Comment on lines -87 to +89
waitForHello(bboxWithMinimumDuration);

assertThat(bboxWithMinimumDuration.isRunning()).isTrue();

waitForHello(bboxWithMinimumDuration);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was wrong previously: once waitForHello returns, sleep && echo would complete and the container should stop. So it is wrong to expect isRunning() to return true here.

It worked fine before on Linux probably because the check was faster than containers' cleanup but I got a flaky behaviour on Windows

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right. Do you remember your original idea here @rnorth?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't the original author, but it looks to me as though the original version was indeed prone to a race condition. It's quite surprising that it's taken so long for this to be detected.

Copy link
Member

@kiview kiview left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very happy to further polish our Windows support (even if in this case, this is not about actual implementation code, but just making our own tests more portable).

azure-pipelines.yml Show resolved Hide resolved
Comment on lines -87 to +89
waitForHello(bboxWithMinimumDuration);

assertThat(bboxWithMinimumDuration.isRunning()).isTrue();

waitForHello(bboxWithMinimumDuration);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right. Do you remember your original idea here @rnorth?

@bsideup bsideup merged commit 3ff0bb2 into master Feb 21, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix_windows_tests branch February 21, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants