Skip to content

Commit

Permalink
SAMZA-1191; Fixed flaky test: TestExponentialSleepStrategy testThread…
Browse files Browse the repository at this point in the history
…InterruptInRetryLoop

It's possible that the interruptee thread (see `#interruptedThread`) gets pre-empted before it has a chance to run the operation (increment `iterations`) and then gets interrupted, causing these assertions to fail.

I think these assertions also aren't critical for the tests which I presume want to test interrupt propagation behavior, so removing them in this change.

vjagadish1989 & xinyuiscool, please take a look.

Author: Prateek Maheshwari <pmaheshw@linkedin.com>

Reviewers: Jagadish <jagadish@apache.org>

Closes apache#113 from prateekm/flaky-ess-test-fix
  • Loading branch information
prateekm authored and jagadish-northguard committed Apr 6, 2017
1 parent 4bf8ab6 commit b5e45b7
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ class TestExponentialSleepStrategy {
(exception, loop) => throw exception
)
}
assertEquals(1, iterations)
assertEquals(1, loopObject.sleepCount)
assertEquals(classOf[InterruptedException], exception.get.getClass)
}

Expand All @@ -155,8 +153,6 @@ class TestExponentialSleepStrategy {
(exception, loop) => throw exception
)
}
assertEquals(1, iterations)
assertEquals(0, loopObject.sleepCount)
assertEquals(classOf[InterruptedException], exception.get.getClass)
}
}

0 comments on commit b5e45b7

Please sign in to comment.