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

Remove dependency on RemoteExecutor in tests #4500

Open
RussKie opened this issue Jan 27, 2021 · 8 comments
Open

Remove dependency on RemoteExecutor in tests #4500

RussKie opened this issue Jan 27, 2021 · 8 comments
Assignees
Labels
test-bug Problem in test source code (most likely)
Milestone

Comments

@RussKie
Copy link
Member

RussKie commented Jan 27, 2021

Problem description:

RemoteExecutor has been used in a number of tests for the sole purpose of enabling visual styles. However RemoteExecutor has proven to be rather unstable (see: dotnet/arcade#5325).

The tests have been update to run with visual styles on by default in #4197, however RemoteExecutor hasn't been cleaned out.

We need to scan the codebase for RemoteExecutor (and "Skip = "Crash with AbandonedMutexException. See: dotnet/arcade#5325"") and update those tests, removing RemoteExecutor.

@RussKie RussKie added help wanted Good issue for external contributors test-bug Problem in test source code (most likely) labels Jan 27, 2021
@RussKie RussKie added this to the 6.0 Preview2 milestone Jan 27, 2021
@RussKie RussKie modified the milestones: 6.0 Preview2, 6.0 Preview3 Feb 23, 2021
@RussKie RussKie modified the milestones: 6.0 Preview3, 6.0 Mar 24, 2021
@RussKie RussKie modified the milestones: 6.0, 7.0 Aug 27, 2021
@RussKie RussKie added up-for-grabs-temp help wanted Good issue for external contributors and removed help wanted Good issue for external contributors up-for-grabs-temp labels May 5, 2022
@ghost ghost modified the milestones: .NET 7.0, Up-for-grabs May 5, 2022
@ghost
Copy link

ghost commented May 5, 2022

This issue is now marked as "up for grabs", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 120 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@willibrandon
Copy link
Contributor

I can help with removing the RemoteExecutor dependency in tests.

What if anything should be done with tests that depend on RemoteExecutor but are not skipped?

@RussKie
Copy link
Member Author

RussKie commented Jul 18, 2022

That'd be great!

We use/tried to use RemoteExecutor for situations where we need change the global state (e.g., disable visual styles, control the clipboard, the mouse or the keyboard, etc.). Because unit tests are run in parallel any changes to the global state destabilises the whole suite.
So one way of resolution is to migrate the RE-dependent tests to the UIIntegration test project that executes tests serially and can bootstrap each test as necessary without risks of affecting other tests.

@RussKie
Copy link
Member Author

RussKie commented Jul 19, 2022

Here's some context #2192 (comment)

@willibrandon
Copy link
Contributor

I have a stash with RemoteExecutor removed and if I recall correctly, there were at least 1 if not more problem tests that when un-skipped, caused other tests to fail. I'll bring myself back up to speed, migrate the RE-dependent tests to the UIIntegration test project, and check the results. Thank you for the context and resolution strategy.

That is good to know that the UIIntegration test project executes tests serially.

@RussKie
Copy link
Member Author

RussKie commented Jul 19, 2022

We can do this in a staggered fashion - i.e., open a PR that fixes one or two tests, then fix another, etc., until all fixed.

@RussKie
Copy link
Member Author

RussKie commented Jul 19, 2022

@willibrandon I'm assigning this to you. Please holler if you won't be able to work on it.

@RussKie RussKie removed the help wanted Good issue for external contributors label Jul 19, 2022
@ghost ghost added the 🚧 work in progress Work that is current in progress label Jul 27, 2022
@lonitra lonitra added the untriaged The team needs to look at this issue in the next triage label Nov 20, 2023
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Nov 21, 2023
@merriemcgaw merriemcgaw removed this from the Help wanted milestone Nov 28, 2023
@merriemcgaw merriemcgaw added this to the Future milestone Nov 28, 2023
@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Nov 28, 2023
@ricardobossan ricardobossan self-assigned this Oct 24, 2024
@ricardobossan
Copy link
Member

@Tanya-Solyanik In #12379 I have re-enabled all tests that were previously skipped with the explanation:
Crash with AbandonedMutexException. See: https://github.com/dotnet/arcade/issues/5325.

Additionally, I restored the correct state of the Application.ParkingWindowTests.cs method by setting:
Control.CheckForIllegalCrossThreadCalls = true;.

Summary of Attempts:

  • Approach 1:
    Removed RemoteExecutor only from Application.ParkingWindowTests.cs while simply re-enabling the other tests.

  • Approach 2:
    Removed RemoteExecutor from all tests.

Both approaches passed local tests but failed automated CI checks.

For now, I’m pausing work on this issue to focus on higher-priority tasks. Let me know if you have any suggestions or would like me to revisit this sooner!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants