You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2019/01/28 23:58:21 UTC
[kudu] 01/05: [java] enable regression test for KUDU-2415
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 3988ab934a0d34a4342fd3b6a97720944b7e5aeb
Author: Hao Hao <ha...@cloudera.com>
AuthorDate: Fri Jan 25 17:43:51 2019 -0800
[java] enable regression test for KUDU-2415
As KUDU-2463 fixed the bug in clean time advancement that now it is
guaranteed to have a non-zero clean time when servicing a scan, it is
safe to enable the regression test to ensure scanning a never-written-to
tablet from a fresh client with no propagated timestamp in
READ_YOUR_WRITE mode should work.
I looped TestScannerMultiTablet 1000 times and no failures are observed.
Change-Id: I9532a435c3b4cf2286630b6809ffa2c8ae1a4acd
Reviewed-on: http://gerrit.cloudera.org:8080/12278
Tested-by: Kudu Jenkins
Reviewed-by: Hao Hao <ha...@cloudera.com>
---
.../java/org/apache/kudu/client/TestScannerMultiTablet.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/java/kudu-client/src/test/java/org/apache/kudu/client/TestScannerMultiTablet.java b/java/kudu-client/src/test/java/org/apache/kudu/client/TestScannerMultiTablet.java
index dabe437..4ddcdd5 100644
--- a/java/kudu-client/src/test/java/org/apache/kudu/client/TestScannerMultiTablet.java
+++ b/java/kudu-client/src/test/java/org/apache/kudu/client/TestScannerMultiTablet.java
@@ -32,7 +32,6 @@ import com.stumbleupon.async.Deferred;
import org.apache.kudu.test.KuduTestHarness;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -274,10 +273,7 @@ public class TestScannerMultiTablet {
// Scanning a never-written-to tablet from a fresh client with no propagated
// timestamp in "read-your-writes' mode should not fail.
@Test(timeout = 100000)
- @Ignore("TODO(KUDU-2415)") // not fixed yet!
public void testReadYourWritesFreshClientFreshTable() throws Exception {
- // NOTE: this test fails because the first tablet in the table
- // is empty and has never been written to.
// Perform scan in READ_YOUR_WRITES mode. Before the scan, verify that the
// propagated timestamp is unset, since this is a fresh client.
@@ -289,7 +285,14 @@ public class TestScannerMultiTablet {
assertEquals(AsyncKuduClient.NO_TIMESTAMP, asyncClient.getLastPropagatedTimestamp());
assertEquals(AsyncKuduClient.NO_TIMESTAMP, scanner.getSnapshotTimestamp());
- assertEquals(9, countRowsInScan(syncScanner));
+ // Since there isn't any write performed from the client, the count
+ // should range from [0, 9].
+ int count = countRowsInScan(syncScanner);
+ assertTrue(count >= 0);
+ assertTrue(count <= 9);
+
+ assertNotEquals(AsyncKuduClient.NO_TIMESTAMP, asyncClient.getLastPropagatedTimestamp());
+ assertNotEquals(AsyncKuduClient.NO_TIMESTAMP, scanner.getSnapshotTimestamp());
}
// Test multi tablets scan in READ_YOUR_WRITES mode for both AUTO_FLUSH_SYNC