This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch branch-4.7
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.7 by this push:
new 6b39435 Fix TestSmoke#testTailingReads
6b39435 is described below
commit 6b3943576fed7a9dd90dacb6bd6a11fa1e4971ce
Author: Sijie Guo <[email protected]>
AuthorDate: Sat May 12 19:32:57 2018 +0800
Fix TestSmoke#testTailingReads
Descriptions of the changes in this PR:
*Motivation*
TestSmoke#testTailingReads is testing the tailing behavior at bookkeeper.
However the current testing logic is a bit
problematic on checking whether the reader has caught up with the expected
last add confirmed. so the read logic break
earlier before reading the expectedLastConfirmedEntry.
*Solution*
Fix the checking logic on breaking the read loop.
Author: Sijie Guo <[email protected]>
Reviewers: Enrico Olivelli <[email protected]>
This closes #1402 from sijie/fix_integration_tests
(cherry picked from commit cd71e0981dffa92edf51f9665117a30265b1cf4a)
Signed-off-by: Sijie Guo <[email protected]>
---
.../java/org/apache/bookkeeper/tests/integration/TestSmoke.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
index 1ab0aff..4e16c68 100644
---
a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
+++
b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
@@ -154,7 +154,7 @@ public class TestSmoke {
assertEquals(lac + 1, nextEntryId);
}
- if (nextEntryId >= lastExpectedConfirmedEntryId) {
+ if (nextEntryId > lastExpectedConfirmedEntryId) {
break;
}
@@ -189,9 +189,9 @@ public class TestSmoke {
result(readFuture);
result(writeFuture);
- assertEquals(readLh.getLastAddConfirmed(), numEntries - 2);
- assertEquals(writeLh.getLastAddConfirmed(), numEntries - 1);
- assertEquals(writeLh.getLastAddPushed(), numEntries - 1);
+ assertEquals(numEntries - 2, readLh.getLastAddConfirmed());
+ assertEquals(numEntries - 1, writeLh.getLastAddConfirmed());
+ assertEquals(numEntries - 1, writeLh.getLastAddPushed());
}
}
--
To stop receiving notification emails like this one, please contact
[email protected].