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

Defer tests to the morphic ui thread #1496

Merged
merged 2 commits into from Dec 22, 2023
Merged

Conversation

guillep
Copy link
Contributor

@guillep guillep commented Dec 22, 2023

Make Spec tests run in the UI thread to avoid concurrency issues.

The problem is more detailed in here: pharo-project/pharo#12502

Problem summary: during the test run in the CI, tests and morphic run in separate tests.
Thus, a test might change a graphic element during the morphic ui draw and break it.
If an exception happens in a thread other than the test thread, the process quits and stops the test run with an unexpected outcome.

@guillep
Copy link
Contributor Author

guillep commented Dec 22, 2023

There is a broken test, unrelated, and caused by some protocol recompilation.

To see the issue in isolation of this PR, the following code adds a new superclass and breaks the test:

ProperPackagesTest debug: #testPackageExtensionsStartsWithProperPackageName.

newTestCase := (TestCase << #NewTestCase)
	package: #toto;
	install.
	
(newTestCase << #SpBaseTest)
	install.
	
ProperPackagesTest debug: #testPackageExtensionsStartsWithProperPackageName.

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.

None yet

2 participants