//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldTimeoutWaitingForAllIndexesToComeOnline() public void shouldTimeoutWaitingForAllIndexesToComeOnline() { // given GraphDatabaseService db = rule.GraphDatabaseAPI; DoubleLatch latch = _provider.installPopulationJobCompletionLatch(); using (Transaction tx = Db.beginTx()) { Db.schema().indexFor(Label.label("Person")).on("name").create(); tx.Success(); } latch.WaitForAllToStart(); // when try { using (Transaction tx = Db.beginTx()) { // then Db.schema().awaitIndexesOnline(1, TimeUnit.MILLISECONDS); fail("Expected IllegalStateException to be thrown"); } } catch (System.InvalidOperationException e) { // good assertThat(e.Message, containsString("come online")); } finally { latch.Finish(); } }
private void DropIndex(IndexDefinition index, DoubleLatch populationCompletionLatch) { using (Transaction tx = _db.beginTx()) { index.Drop(); populationCompletionLatch.Finish(); tx.Success(); } }