//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void concurrentSchemaRuleRemove() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ConcurrentSchemaRuleRemove() { SchemaCache cache = NewSchemaCache(); int indexNumber = 20; for (int i = 0; i < indexNumber; i++) { cache.AddSchemaRule(NewIndexRule(i, i, i)); } Race race = new Race(); int numberOfDeletions = 10; for (int i = 0; i < numberOfDeletions; i++) { int indexId = i; race.AddContestant(() => cache.removeSchemaRule(indexId)); } race.Go(); assertEquals(indexNumber - numberOfDeletions, Iterables.count(cache.IndexDescriptors())); for (int labelId = numberOfDeletions; labelId < indexNumber; labelId++) { assertEquals(1, Iterators.count(cache.IndexDescriptorsForLabel(labelId))); } for (int propertyId = numberOfDeletions; propertyId < indexNumber; propertyId++) { assertEquals(1, Iterators.count(cache.IndexesByProperty(propertyId))); } }