abdullah alamoudi has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/2219
Change subject: [ASTERIXDB-2196][TEST] Fix MultiPartitionLSMIndexTest
......................................................................
[ASTERIXDB-2196][TEST] Fix MultiPartitionLSMIndexTest
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- There is a small window where a flush can be scheduled
during the check of the component ids. This is avoided
now by waiting for all io operations.
Change-Id: I7da1ba5859aea4e75eca605113a1f72faa1914c2
---
M
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/19/2219/1
diff --git
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
index c12f50c..8b8c600 100644
---
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
+++
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
@@ -562,9 +562,25 @@
}
// ensure that the insert completes
insertReq.await();
- // ensure the two memory components at partition 0 have different
component ids
+ dsLifecycleMgr.getDatasetInfo(DATASET_ID).waitForIO();
+ // check first partition
+ List<ILSMDiskComponent> secondaryDiskComponents =
secondaryLsmBtrees[0].getDiskComponents();
+ List<ILSMDiskComponent> primaryDiskComponents =
primaryLsmBtrees[0].getDiskComponents();
+ for (int i = 0; i < secondaryDiskComponents.size(); i++) {
+ Assert.assertEquals(secondaryDiskComponents.get(i).getId(),
primaryDiskComponents.get(i).getId());
+ }
+ // check second partition
+ secondaryDiskComponents =
secondaryLsmBtrees[1].getDiskComponents();
+ primaryDiskComponents = primaryLsmBtrees[1].getDiskComponents();
+ for (int i = 0; i < secondaryDiskComponents.size(); i++) {
+ Assert.assertEquals(secondaryDiskComponents.get(i).getId(),
primaryDiskComponents.get(i).getId());
+ }
+ // ensure the two memory components at partition 0 have the same
component ids
Assert.assertEquals(primaryLsmBtrees[0].getCurrentMemoryComponent().getId(),
secondaryLsmBtrees[0].getCurrentMemoryComponent().getId());
+ // ensure the two memory components at partition 0 have the same
component ids
+
Assert.assertEquals(primaryLsmBtrees[1].getCurrentMemoryComponent().getId(),
+ secondaryLsmBtrees[1].getCurrentMemoryComponent().getId());
} catch (Throwable e) {
e.printStackTrace();
Assert.fail(e.getMessage());
--
To view, visit https://asterix-gerrit.ics.uci.edu/2219
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7da1ba5859aea4e75eca605113a1f72faa1914c2
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>