Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRebuildMissingCountsStoreOnStart() throws java.io.IOException, org.neo4j.internal.kernel.api.exceptions.TransactionFailureException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldRebuildMissingCountsStoreOnStart()
        {
            // given
            CreateAliensAndHumans();

            // when
            FileSystemAbstraction fs = Shutdown();

            DeleteCounts(fs);
            Restart(fs);

            // then
            using ([email protected] tx = (( GraphDatabaseAPI )_db).DependencyResolver.resolveDependency(typeof(Kernel)).beginTransaction(@explicit, AUTH_DISABLED))
            {
                assertEquals(ALIENS + HUMANS, tx.DataRead().countsForNode(-1));
                assertEquals(ALIENS, tx.DataRead().countsForNode(LabelId(_alien)));
                assertEquals(HUMANS, tx.DataRead().countsForNode(LabelId(_human)));
            }

            // and also
            LogMatcherBuilder matcherBuilder = inLog(typeof(MetaDataStore));

            _internalLogProvider.assertAtLeastOnce(matcherBuilder.warn("Missing counts store, rebuilding it."));
            _internalLogProvider.assertAtLeastOnce(matcherBuilder.warn("Counts store rebuild completed."));
        }
Exemplo n.º 2
0
 private void AssertLogExistsForRecoveryOn(string labelAndProperty)
 {
     _logProvider.assertAtLeastOnce(inLog(typeof(IndexSamplingController)).debug("Recovering index sampling for index %s", labelAndProperty));
 }