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

Change to enable running two unit tests on MacOS #210

Merged
merged 5 commits into from
May 20, 2022
Merged

Change to enable running two unit tests on MacOS #210

merged 5 commits into from
May 20, 2022

Conversation

seatim
Copy link

@seatim seatim commented May 20, 2022

This PR makes a small change to a sleep time in one function that is used by two unit tests. That change enables one unit test to pass that was otherwise failing on MacOS. Changing the sleep time does not compromise the integrity of the test, I believe. With all tests now passing on MacOS, the code to skip two tests is not needed, so that code is removed.

@seatim seatim changed the title Increase timeout in run_interactive_interrupt and run tests on MacOS Increase sleep time in run_interactive_interrupt and run tests on MacOS May 20, 2022
@@ -904,7 +872,7 @@ def run_interactive_interrupt(interactive):
p = multiprocessing.Process(
target=_long_running_successful_problem, args=(interactive,))
p.start()
time.sleep(.1)
time.sleep(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

See line 858, you might bump the _long_running_successful_problem to time out after 2s

Copy link
Author

Choose a reason for hiding this comment

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

I made that change locally and tested just now on both Mac and Linux, and the tests still pass.

Copy link
Author

Choose a reason for hiding this comment

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

Added that to the PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, this is a ridiculously complex test. Line 893:

    if time.perf_counter() - t0 > .5:
        # be a little generous here... but the caller should kill this in way less than .5s
        sys.exit(1)

I guess we should bump that to 1.5?

Copy link
Author

@seatim seatim May 20, 2022

Choose a reason for hiding this comment

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

Ah, this is a ridiculously complex test.

😆 It sure is!

I guess we should bump that to 1.5?

Tested that locally and it is safe seems safe and prudent. Will do.

@seatim seatim changed the title Increase sleep time in run_interactive_interrupt and run tests on MacOS Change to enable running two unit tests on MacOS May 20, 2022
@boothby
Copy link
Collaborator

boothby commented May 20, 2022

This ticket closes #175. Thanks for your help, @seatim.

Tim Doyle added 5 commits May 20, 2022 11:59
In my testing on MacOS, the "test_interactive_interrupt" test passed without
any changes needed, and the "test_headless_interrupt" test only needed to have
this sleep time increased to pass.
The previous commit caused a unit test to fail on Linux.  This change fixes
that.
@boothby boothby merged commit eb1caec into dwavesystems:main May 20, 2022
@seatim seatim deleted the mac_intr_tests branch May 20, 2022 20:02
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

Successfully merging this pull request may close these issues.

2 participants