Page MenuHomeSoftware Heritage

Always flush kafka producers in tests
ClosedPublic

Authored by olasd on Wed, Jul 21, 3:14 PM.

Details

Summary

Sometimes, in a very loaded situation, the producer can return and let
the consumer start before the topic is actually created.

Adding a producer.flush() avoids that race condition.

Diff Detail

Repository
rDSEA Archive search
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6016 (id=21729)

Rebasing onto d58705a0eb...

Current branch diff-target is up to date.
Changes applied before test
commit 0a9023b81108244b1ac41e124272a0473f2ff5c3
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed Jul 21 15:12:49 2021 +0200

    Always flush kafka producers in tests
    
    Sometimes, in a very loaded situation, the producer can return and let
    the consumer start before the topic is actually created.
    
    Adding a `producer.flush()` avoids that race condition.

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/223/ for more details.

olasd requested review of this revision.Wed, Jul 21, 3:18 PM
This revision is now accepted and ready to land.Wed, Jul 21, 3:44 PM

Build is green

Patch application report for D6016 (id=21755)

Rebasing onto 4e453304ad...

Current branch diff-target is up to date.
Changes applied before test
commit 122d7caf6577f4090f66e909688178b1e6ce41b1
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed Jul 21 15:12:49 2021 +0200

    Always flush kafka producers in tests
    
    Sometimes, in a very loaded situation, the producer can return and let
    the consumer start before the topic is actually created.
    
    Adding a `producer.flush()` avoids that race condition.

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/231/ for more details.

This revision was automatically updated to reflect the committed changes.