Skip to content

Improve integration tests and fix some intemittent tests #3033

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

Merged
merged 17 commits into from
Jul 16, 2025

Conversation

aleDsz
Copy link
Member

@aleDsz aleDsz commented Jul 15, 2025

No description provided.

@aleDsz aleDsz self-assigned this Jul 15, 2025
@jonatanklosko
Copy link
Member

Last comment, otherwise looks good to me :)

@aleDsz
Copy link
Member Author

aleDsz commented Jul 16, 2025

There's still a test that fails everytime you run with integration tests: sends status events about running app specs (Livebook.Apps.ManagerTest) (test/livebook/apps/manager_test.exs:116).

I tried the approach to send individual messages only for test env and only to a certain topic and it still intemittent due to concurrency.

@jonatanklosko
Copy link
Member

jonatanklosko commented Jul 16, 2025

@aleDsz the issue is that in that test we expect only one permanent app:

Apps.set_startup_app_specs([app_spec])
Apps.Manager.sync_permanent_apps()
assert_receive {:apps_manager_status, [%{app_spec: ^app_spec, running?: false}]}
assert_receive {:apps_manager_status, [%{app_spec: ^app_spec, running?: true}]}

however there are leftover Team hubs from other tests and some of them have app deployments, so there are extra statuses in the list. Normally we could relax the assertions to entry in list, but here it is a bit problematic, because there may be multiple messages and we use the pattern match to wait for a specific one.

I figured the best solution is to make sure there are no leftover Team hubs in the first place, so I added on_exit to do that in fefd552 :)

Copy link
Contributor

@josevalim josevalim left a comment

Choose a reason for hiding this comment

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

I am happy. If @jonatanklosko is happy, we can ship it!

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

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

🐑

@aleDsz aleDsz merged commit 98561f9 into main Jul 16, 2025
4 checks passed
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