service.addManagedRepository( repo );
assertNotNull( service.getManagedRepository( repo.getId() ) );
+ RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader );
+
+ int timeout = 20000;
+ while ( timeout > 0 && repositoriesService.alreadyScanning( repo.getId() ) )
+ {
+ Thread.sleep( 500 );
+ timeout -= 500;
+ }
+
service.deleteManagedRepository( repo.getId(), true );
assertNull( service.getManagedRepository( repo.getId() ) );
}
assertNull( service.getManagedRepository( repo.getId() ) );
}
service.addManagedRepository( repo );
+
+ RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader );
+
+ int timeout = 20000;
+ while ( timeout > 0 && repositoriesService.alreadyScanning( repo.getId() ) )
+ {
+ Thread.sleep( 500 );
+ timeout -= 500;
+ }
+
repo = service.getManagedRepository( repo.getId() );
assertNotNull( repo );
assertEquals( "test", repo.getName() );
assertNotNull( repo );
assertEquals( "toto", repo.getName() );
+ timeout = 20000;
+ while ( timeout > 0 && repositoriesService.alreadyScanning( repo.getId() ) )
+ {
+ Thread.sleep( 500 );
+ timeout -= 500;
+ }
+
service.deleteManagedRepository( repo.getId(), true );
assertNull( service.getManagedRepository( repo.getId() ) );