question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BulkheadAsynchRetryTest.testRetriesJoinBackOfQueue seems wrong

See original GitHub issue

My reading of the test BulkheadAsynchRetryTest.testRetriesJoinBackOfQueue suggests that it’s implementation-dependent. That is, I believe it’s possible to write an compliant implementation that fails this test. I’m specifically thinking:

  1. The beginning of the test reads:
AsyncBulkheadTask taskA = newTask();
Future resultA = retryQueueAsyncBean.test(taskA);

AsyncBulkheadTask taskB = newTask();
Future resultB = retryQueueAsyncBean.test(taskB);

AsyncBulkheadTask taskC = newTask();
Future resultC = retryQueueAsyncBean.test(taskC);

taskA.assertStarting(resultA);
taskB.assertNotStarting();
taskC.assertNotStarting();

This test expects the first call will be the first to make it into the bulkhead, while there’s nothing in the test that would affect thread ordering. Clearly this presumes one implementation strategy, while other implementation strategies are also valid.

  1. The test javadoc also says

Test that when an execution is retried, it goes to the back of the bulkhead queue.

This itself again presumes an implementation strategy, while there are other valid implementation strategies.

WDYT?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Ladicekcommented, Feb 15, 2019

I’ll submit a PR.

0reactions
Ladicekcommented, Feb 19, 2019

I forgot to mention the issue number in the PR, but this has been resolved in #410.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found