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

Topic fix some tests #5676

Merged
merged 3 commits into from
Jan 8, 2022
Merged

Conversation

telephon
Copy link
Member

@telephon telephon commented Jan 1, 2022

Purpose and Motivation

NodeProxy tests that failed because of wrong assumptions in the test.

Types of changes

  • Bug fix

To-do list

  • Code is tested
  • All tests are passing
  • This PR is ready for review

When a node map is copied, the values of the `out` control must differ. So better not test for this ...
The time wasn't enough for the server to have fully released the synthDef.
@dyfer
Copy link
Member

dyfer commented Jan 6, 2022

Thanks so much for this, @telephon !

Could you also remove the fixed tests from the exclusion list in https://github.com/telephon/supercollider/blob/topic-fix--some-tests/testsuite/scripts/gha_test_run_proto.json ? That way they'll be run in the CI again.

@@ -267,7 +267,7 @@ TestNodeProxy : UnitTest {
timeout.stop;
resp.free;

this.assertEquals(result, proxy.source, "after the crossfade from a ugen function to a value the bus should have this value");
this.assertFloatEquals(result, proxy.source, "after the crossfade from a ugen function to a value the bus should have this value");
Copy link
Member

Choose a reason for hiding this comment

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

Did test_control_fade fail before? If not, what's the rationale for this change?

@@ -71,6 +71,7 @@ TestNodeProxy_Server : UnitTest {
// ... and also afterwards, we force an update
server.sendStatusMsg;
server.sync;
0.8.wait;
Copy link
Member

@dyfer dyfer Jan 6, 2022

Choose a reason for hiding this comment

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

Is this really the only way to fix this? This is a rather lengthy wait. Could this be addressed by sending some other message to the server and running another server.sync? Or maybe trying the shorter wait time?

If you remove the exclusion from gha_test_run_proto.json we'll be able to see how the shorter wait time performs in the CI (which is arguably not tuned for audio/low-latency performance).

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 agree. I find it weird that this doesn't work faster, but it has to do with the time the server takes to report the deallocation of the synth def.

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've found another solution: just fix the wrong order in the sync

@dyfer dyfer added the comp: testing UnitTest class, refactors of existing tests, etc.; don't use if just adding tests as part of a PR label Jan 6, 2022
@adcxyz adcxyz merged commit 11295c7 into supercollider:develop Jan 8, 2022
@dyfer
Copy link
Member

dyfer commented Jan 8, 2022

Hey @adcxyz
Maybe I should've mark this as "changes requested", my bad, but if you look at my comments, some of them were not addressed. I'd prefer to wait for outstanding discussion to be resolved before merging a PR, thanks!

@adcxyz
Copy link
Contributor

adcxyz commented Jan 8, 2022

@dyfer
Sorry, read the discussion too quickly, and thought @telephon had addressed your concerns.
What is still open, enabling these tests again,
and anything else?

@dyfer
Copy link
Member

dyfer commented Jan 8, 2022

No worries @adcxyz
Yes, the main point was to remove fixed tests from the "skipped" list in gha_test_run_proto.json. Aside from that I asked about the change in test_control_fade but that change is minor so I assume it's fine.

@dyfer
Copy link
Member

dyfer commented Jan 19, 2022

test_synthDef_isReleased_afterFree got enabled in #5702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: testing UnitTest class, refactors of existing tests, etc.; don't use if just adding tests as part of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants