This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 761e42c Fix method order in order to make the execution of
TestEntryLog predictable
761e42c is described below
commit 761e42c608689dc595f019a2ac6a92fa1e0d30c7
Author: Enrico Olivelli <[email protected]>
AuthorDate: Mon Feb 17 09:12:37 2020 +0100
Fix method order in order to make the execution of TestEntryLog predictable
### Motivation
TestEntyLog reuses the entryLogger variable across test methods execution,
resulting in an unpredictable execution.
We can at least make the test work consistently across environments using
JUnit built-in FixMethodOrder annotation
### Changes
FixMethodOrder(MethodSorters.NAME_ASCENDING)
Fixes #2260
Reviewers: Atri Sharma <[email protected]>
This closes #2266 from eolivelli/fix/flaky
---
.../src/test/java/org/apache/bookkeeper/bookie/TestEntryLog.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/TestEntryLog.java
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/TestEntryLog.java
index 836fdf2..fd35204 100644
---
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/TestEntryLog.java
+++
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/TestEntryLog.java
@@ -67,13 +67,16 @@ import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.FixMethodOrder;
import org.junit.Test;
+import org.junit.runners.MethodSorters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Tests for EntryLog.
*/
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestEntryLog {
private static final Logger LOG =
LoggerFactory.getLogger(TestEntryLog.class);