From: Ciprian Ciubotariu Date: Tue, 31 May 2016 17:05:29 +0000 (+0300) Subject: Fix non-deterministic test failures X-Git-Tag: without_jdo~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F21%2Fhead;p=archiva.git Fix non-deterministic test failures archiva-rest-services tests need to wait for repo scanning to finish --- diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java index 848d4b7a6..7ee34c6d9 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java @@ -69,6 +69,7 @@ public class BrowseServiceTest throws Exception { scanRepo( TEST_REPO_ID ); + waitForScanToComplete( TEST_REPO_ID ); BrowseService browseService = getBrowseService( authorizationHeader, false ); @@ -92,6 +93,7 @@ public class BrowseServiceTest try { scanRepo( TEST_REPO_ID ); + waitForScanToComplete( TEST_REPO_ID ); BrowseService browseService = getBrowseService( authorizationHeader, false ); @@ -410,6 +412,7 @@ public class BrowseServiceTest throws Exception { scanRepo( TEST_REPO_ID ); + waitForScanToComplete( TEST_REPO_ID ); BrowseService browseService = getBrowseService( authorizationHeader, false );