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

don't execute the setup method for NodeManipulatorExtensionTests tests twice #15768

Closed
wants to merge 2 commits into from

Conversation

mjkkirschner
Copy link
Member

@mjkkirschner mjkkirschner commented Jan 21, 2025

Purpose

I noticed that because we were not overriding the start method and instead hiding it that nunit was calling both methods that were marked with [setup] so we were basically starting dynamo twice. I have no idea if this will stabilize the intermittent failures we have been seeing but it can't hurt!

locally, this change lowers the number of operations in the dispatcher queue from 131 to 28 when it moves on to the next test fixture.

@mjkkirschner mjkkirschner changed the title don't execute the setup method for DynamoTestUIBase tests twice don't execute the setup method for NodeManipulatorExtensionTests tests twice Jan 21, 2025
@@ -28,7 +28,7 @@ protected override IEnumerable<IGizmo> GetGizmos(bool createOrUpdate)
public class NodeManipulatorExtensionTests : DynamoTestUIBase
{
[SetUp]
public virtual void Start()
public override void Start()
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!. DId you try to turn on the dispatrcher ops waiting after this change ?

Copy link
Member Author

@mjkkirschner mjkkirschner Jan 21, 2025

Choose a reason for hiding this comment

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

I did not, will give it a shot, were you able to repro the helix crash locally?

Copy link
Member Author

Choose a reason for hiding this comment

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

on second thought, there's no reason for this method to exist if we're flushing the dispatcher.

Also, I think theres something weird with the way we increment the dispatcher ops when this flag is true...

Copy link
Contributor

Choose a reason for hiding this comment

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

I did manage to reproduce the crash locally

@@ -132,10 +130,10 @@ protected virtual DynamoModel.IStartConfiguration CreateStartConfiguration(IPath
[TearDown]
public void Exit()
{

Dispatcher.CurrentDispatcher.Hooks.OperationPosted -= Hooks_OperationPosted;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we remove the handler only after the DoEventsLoop ?
I wonder if operations can still post other operations..

Copy link
Member Author

Choose a reason for hiding this comment

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

interesting...

Copy link

github-actions bot commented Jan 21, 2025

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests

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.

3 participants