Skip to content

Change to enable running two unit tests on MacOS#210

Merged
boothby merged 5 commits intodwavesystems:mainfrom
seatim:mac_intr_tests
May 20, 2022
Merged

Change to enable running two unit tests on MacOS#210
boothby merged 5 commits intodwavesystems:mainfrom
seatim:mac_intr_tests

Conversation

@seatim
Copy link
Copy Markdown

@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
Comment thread tests/test_lib.py Outdated
target=_long_running_successful_problem, args=(interactive,))
p.start()
time.sleep(.1)
time.sleep(1)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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