Skip to content

Turn HarnessTest in table_test into a parameterized test#6974

Closed
ltamasi wants to merge 2 commits intofacebook:masterfrom
ltamasi:harness_test
Closed

Turn HarnessTest in table_test into a parameterized test#6974
ltamasi wants to merge 2 commits intofacebook:masterfrom
ltamasi:harness_test

Conversation

@ltamasi
Copy link
Copy Markdown
Contributor

@ltamasi ltamasi commented Jun 12, 2020

Summary:
HarnessTest in table_test.cc currently tests many parameter
combinations sequentially in a loop. This is problematic from
a testing perspective, since if the test fails, we have no way of
knowing how many/which combinations have failed. It can also cause timeouts on
our test system due to the sheer number of combinations tested.
(Specifically, the parallel compression threads parameter added by
#6262 seems to have been the last straw.)
There is some DIY code there that splits the load among eight test cases
but that does not appear to be sufficient anymore.

Instead, the patch turns HarnessTest into a parameterized test, so all the
parameter combinations can be tested separately and potentially
concurrently. It also cleans up the tests a little, fixes
RandomizedLongDB, which did not get updated when the parallel
compression threads parameter was added, and turns FooterTests into a
standalone test case (since it does not actually need a fixture class).

Test Plan:
make check

Summary:
`HarnessTest` in `table_test.cc` currently tests many parameter
combinations sequentially using nested loops. This is problematic from
a testing perspective, since if the test fails, we have no way of
knowing how many/which combinations have failed. It can also cause timeouts on
our test system due to the sheer number of combinations tested.
(Specifically, the parallel compression threads parameter added by
facebook#6262 seems to have been the last straw.)

The patch turns `HarnessTest` into a parameterized test, so the various
parameter combinations can be tested separately and potentially
concurrently. It also cleans up the tests a little, fixes
`RandomizedLongDB`, which did not get updated when the parallel
compression threads parameter was added, and turns `FooterTests` into a
standalone test case (since it does not actually need a fixture class).

Test Plan:
`make check`
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@siying
Copy link
Copy Markdown
Contributor

siying commented Jun 12, 2020

Thank you for improving it!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@ltamasi merged this pull request in bacd6ed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants