-
Notifications
You must be signed in to change notification settings - Fork 429
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
Fix flaky sm tests by making sid's unique #4103
Conversation
9120f13
to
ffa6212
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #4103 +/- ##
==========================================
+ Coverage 83.88% 83.89% +0.01%
==========================================
Files 551 551
Lines 33594 33594
==========================================
+ Hits 28180 28184 +4
+ Misses 5414 5410 -4 ☔ View full report in Codecov by Sentry. |
Sid's should be created for different Pids - otherwise the timestamp alone does not guarantee uniqueness. The sm tests started failing on fast machines, which could generate a lot of sid's in a single microsecond. On Apple M1 the small tests were failing all the time. To fix this, spawn a new process when generating a sid in the tests. Forward incoming messages to the test process, because some tests need to check them.
ffa6212
to
8b6f494
Compare
elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 8b6f494 small_tests_24 / small_tests / 8b6f494 small_tests_25 / small_tests / 8b6f494 small_tests_25_arm64 / small_tests / 8b6f494 ldap_mnesia_24 / ldap_mnesia / 8b6f494 ldap_mnesia_25 / ldap_mnesia / 8b6f494 dynamic_domains_mysql_redis_25 / mysql_redis / 8b6f494 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 8b6f494 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 8b6f494 bosh_SUITE:essential_https:accept_higher_hold_value{error,
{{assertEqual,
[{module,bosh_SUITE},
{line,260},
{expression,"get_bosh_sessions ( )"},
{expected,[]},
{value,
[{bosh_session,<<"b2317b5a2c7df090881caf781cdbc7d03d9fc904">>,
<9313.10152.0>}]}]},
[{bosh_SUITE,accept_higher_hold_value,1,
[{file,"/home/circleci/project/big_tests/tests/bosh_SUITE.erl"},
{line,260}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} internal_mnesia_25 / internal_mnesia / 8b6f494 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 8b6f494 pgsql_mnesia_24 / pgsql_mnesia / 8b6f494 pgsql_cets_25 / pgsql_cets / 8b6f494 mysql_redis_25 / mysql_redis / 8b6f494 pgsql_mnesia_25 / pgsql_mnesia / 8b6f494 mssql_mnesia_25 / odbc_mssql_mnesia / 8b6f494 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 8b6f494 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked that erlang:monotonic_time/X
doesn't have a strictly increasing mode, so it can still generate repeated values start_link
👌🏽
Sid's should be created for different Pids - otherwise the timestamp alone does not guarantee uniqueness.
The sm tests started failing on fast machines, which could generate a lot of sid's in a single microsecond. On Apple M1 the small tests were failing all the time.
To fix this, spawn a new process when generating a sid in the tests. Forward incoming messages to the test process, because some tests need to check them.