Murtadha Hubail has submitted this change and it was merged. 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 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2219 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Murtadha Hubail <[email protected]> --- M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java 1 file changed, 17 insertions(+), 1 deletion(-) Approvals: Anon. E. Moose #1000171: Jenkins: Verified; No violations found; Verified Murtadha Hubail: Looks good to me, approved 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: merged Gerrit-Change-Id: I7da1ba5859aea4e75eca605113a1f72faa1914c2 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]>
