-
Notifications
You must be signed in to change notification settings - Fork 3k
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
test(metadata-io): Improve speed of ElasticSearch tests #3160
test(metadata-io): Improve speed of ElasticSearch tests #3160
Conversation
38a5691
to
be330fb
Compare
be330fb
to
3541a43
Compare
7d6a9b6
to
4a88273
Compare
Hey @EnricoMi - I'm really eager to get this one in! Which test are failing with this improvement? Anything I can do to help? |
@gabe-lyons the first parametrized run of And test |
7dd9813
to
d8bc9cb
Compare
dd6094a
to
625bf60
Compare
@gabe-lyons looks like there is still a race condition depending on the machine the tests run on. On my local machine I never see tests failing. On GitHub, tests occasionally fail (added data not visible, removed data still there). Maybe the
Given the flag has been written after changes before |
@EnricoMi that approach makes sense to me. Hopefully with that we would still be able to capture most of the performance optimizations you've gained here! |
625bf60
to
86d9c61
Compare
86d9c61
to
7fbf8e0
Compare
Hey @EnricoMi - this looks almost ready to merge! Can you rebase on master first? There was a small change to ES tests since this PR was opened: |
@gabe-lyons that PR is contained already, I have rebased this recently: https://github.com/EnricoMi/datahub/commits/branch-fix-es-graph-test-sync/metadata-io/src/test/java/com/linkedin/metadata/search/elasticsearch/ElasticSearchServiceTest.java |
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.
LGTM!
This improves
syncAfterWrite
for ElasticSearch GraphService tests, which reduces test time to the possible minimum (0,08s per test, not waiting 5s per test any more). This fixes #3124.The logic of
syncAfterWrite
is used by all ElasticSearch tests in metadata-io now, speeding up those tests as well.