GitHub user mjsax opened a pull request:
https://github.com/apache/kafka/pull/2781
MINOR: fix flaky StateDirectoryTest
This fixes:
```
java.lang.AssertionError: expected:<2> but was:<3>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at
org.apache.kafka.streams.processor.internals.StateDirectoryTest.shouldCleanUpTaskStateDirectoriesThatAreNotCurrentlyLocked(StateDirectoryTest.java:145)
```
While running test in infinite loop, hit other problems:
- fixed file management (release all locks and close everything)
- increased sleep time for
`shouldCleanupStateDirectoriesWhenLastModifiedIsLessThanNowMinusCleanupDelay`
too (was flaky as well)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mjsax/kafka minor-fix-stateDirectoryTest
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/2781.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2781
----
commit 646ab88368167e4318a992b4ac51f3f046bc857a
Author: Matthias J. Sax <[email protected]>
Date: 2017-03-31T22:15:34Z
MINOR: fix flaky StateDirectoryTest
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---