Skip to content

Conversation

@heifner
Copy link
Contributor

@heifner heifner commented May 19, 2025

Do not require every thread to run a task in test. In practice sometimes a thread doesn't actually run a task. There is nothing that would guarantee every thread runs at least one task, so don't require it.

Resolves #1502

…imes a thread doesn't actually run a task.
@heifner heifner requested review from greg7mdp and linh2931 May 19, 2025 14:40
@heifner heifner added the OCI Work exclusive to OCI team label May 19, 2025
@heifner heifner linked an issue May 19, 2025 that may be closed by this pull request
BOOST_CHECK(run_on_2 > 0);
BOOST_CHECK(run_on_3 > 0);
BOOST_CHECK(run_on_main > 0);
// We expect at least one to run on every thread including main, but nothing guarantees that
Copy link
Contributor

Choose a reason for hiding this comment

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

Because we already have BOOST_REQUIRE_EQUAL(run_on_1+run_on_2+run_on_3+run_on_main, num_expected);, can we just remove those BOOST_WARN checks?

Copy link
Contributor

Choose a reason for hiding this comment

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

But put a comment there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm ok with removing them. @greg7mdp what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, let's remove them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! Very clean!

@heifner heifner merged commit df79bb6 into release/1.2 May 19, 2025
36 checks passed
@heifner heifner deleted the GH-1502-test-fix-1.2 branch May 19, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCI Work exclusive to OCI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: custom_appbase_tests

3 participants