Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void storeLayoutForAbsoluteFile()
        internal virtual void StoreLayoutForAbsoluteFile()
        {
            File        storeDir    = _testDirectory.storeDir();
            StoreLayout storeLayout = StoreLayout.Of(storeDir);

            assertEquals(storeDir, storeLayout.StoreDirectory());
        }
Beispiel #2
0
        /// <summary>
        /// Tests an issue where loading all relationship types and property indexes after
        /// the neostore data source had been started internally. The db would be in a
        /// state where it would need recovery for the neostore data source, as well as some
        /// other data source. This would fail since eventually TxManager#getTransaction()
        /// would be called, which would fail since it hadn't as of yet recovered fully.
        /// Whereas that failure would happen in a listener and merely be logged, one effect
        /// of it would be that there would seem to be no relationship types in the database.
        /// </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void recoverNeoAndIndexHavingAllRelationshipTypesAfterRecovery() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void RecoverNeoAndIndexHavingAllRelationshipTypesAfterRecovery()
        {
            // Given (create transactions and kill process, leaving it needing for recovery)
            File storeDir = TestDirectory.storeDir();

//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            assertEquals(0, Runtime.exec(new string[] { JavaExecutable.ToString(), "-Djava.awt.headless=true", "-cp", ClassPath, this.GetType().FullName, storeDir.AbsolutePath }).waitFor());

            // When
            GraphDatabaseService db = (new TestGraphDatabaseFactory()).newEmbeddedDatabase(storeDir);

            // Then
            try
            {
                using (Transaction ignored = Db.beginTx(), ResourceIterator <RelationshipType> typeResourceIterator = Db.AllRelationshipTypes.GetEnumerator())
                {
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                    assertEquals(MyRelTypes.TEST.name(), typeResourceIterator.next().name());
                }
            }
            finally
            {
                Db.shutdown();
            }
        }
Beispiel #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldRunDeferredExecutors() throws InterruptedException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldRunDeferredExecutors()
        {
            AtomicInteger counter = new AtomicInteger(0);
            Semaphore     @lock   = new Semaphore(1);

            BufferingExecutor later = new BufferingExecutor();

            // add our later executor to the external dependencies
            GraphDatabaseDependencies externalDependencies = newDependencies().withDeferredExecutor(later, Group.LOG_ROTATION);

            // Take the lock, we're going to use this to synchronize with tasks that run in the executor
            @lock.acquire(1);

            // add an increment task to the deferred executor
            later.Execute(counter.incrementAndGet);
            later.Execute(@lock.release);

            // if I try and get the lock it should fail because the deferred executor is still waiting for a real executor implementation.
            // n.b. this will take the whole timeout time. So don't set this high, even if it means that this test might get lucky and pass
            assertFalse(@lock.tryAcquire(1, 1, TimeUnit.SECONDS));
            // my counter is still unincremented as well
            assertThat(counter.get(), equalTo(0));

            // When I construct a PlatformModule...
            PlatformModule pm = new PlatformModule(_testDirectory.storeDir(), Config.defaults(), DatabaseInfo.UNKNOWN, externalDependencies);

            // then the tasks that I queued up earlier should be run...
            // the timeout here is really high to ensure that this test does not become flaky because of a slow running JVM
            // e.g. due to lots of CPU contention or garbage collection.
            assertTrue(@lock.tryAcquire(1, 60, TimeUnit.SECONDS));
            assertThat(counter.get(), equalTo(1));
        }
Beispiel #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void Setup()
        {
            File sslObjectsDir = new File(TestDirectory.storeDir(), "certificates");

            assertTrue(sslObjectsDir.mkdirs());

            _sslResource = selfSignedKeyId(0).trustKeyId(0).install(sslObjectsDir);

            CreateAndStartDb();
        }
Beispiel #5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void SetUp()
        {
            File txLogLocation = new File(TestDirectory.directory(), "txLogLocation");

            _config = Config.builder().withSetting(GraphDatabaseSettings.logical_logs_location, txLogLocation.AbsolutePath).build();
            File storeDir = TestDirectory.storeDir();

            _databaseLayout    = DatabaseLayout.of(storeDir, _config.get(GraphDatabaseSettings.active_database));
            _fsa               = TestDirectory.FileSystem;
            _commitStateHelper = new CommitStateHelper(PageCacheRule.getPageCache(_fsa), _fsa, _config);
        }
Beispiel #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void checkStartLogLine(int hoursShift, String timeZoneSuffix) throws java.io.IOException
        private void CheckStartLogLine(int hoursShift, string timeZoneSuffix)
        {
            TimeZone.Default = TimeZone.getTimeZone(ZoneOffset.ofHours(hoursShift));
            File storeDir                 = TestDirectory.storeDir(hoursShift.ToString());
            File databaseDirectory        = TestDirectory.databaseLayout(storeDir).databaseDirectory();
            GraphDatabaseService database = (new TestGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(databaseDirectory).setConfig(GraphDatabaseSettings.db_timezone, LogTimeZone.SYSTEM.name()).newGraphDatabase();

            database.Shutdown();
            Path   databasePath = storeDir.toPath();
            Path   debugLog     = Paths.get("logs", "debug.log");
            string debugLogLine = GetLogLine(databasePath, debugLog);

            assertTrue(debugLogLine, debugLogLine.Contains(timeZoneSuffix));
        }
Beispiel #7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldPropagateIOExceptions() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldPropagateIOExceptions()
        {
            // Given
            TransactionFailureException exceptionThrown = null;

            File storeDir = TestDirectory.storeDir();
            LimitedFileSystemGraphDatabase db = new LimitedFileSystemGraphDatabase(storeDir);

            using (Transaction tx = Db.beginTx())
            {
                Db.createNode();
                tx.Success();
            }

            long logVersion = Db.DependencyResolver.resolveDependency(typeof(LogVersionRepository)).CurrentLogVersion;

            Db.runOutOfDiskSpaceNao();

            // When
            try
            {
                using (Transaction tx = Db.beginTx())
                {
                    Db.createNode();
                    tx.Success();
                }
            }
            catch (TransactionFailureException e)
            {
                exceptionThrown = e;
            }
            finally
            {
                assertNotNull("Expected tx finish to throw TransactionFailureException when filesystem is full.", exceptionThrown);
                assertTrue(Exceptions.contains(exceptionThrown, typeof(IOException)));
            }

            Db.somehowGainMoreDiskSpace();               // to help shutting down the db
            Db.shutdown();

            PageCache pageCache = PageCacheRule.getPageCache(Db.FileSystem);
            File      neoStore  = TestDirectory.databaseLayout().metadataStore();

            assertEquals(logVersion, MetaDataStore.getRecord(pageCache, neoStore, MetaDataStore.Position.LOG_VERSION));
        }
Beispiel #8
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void checkExpectedDatabaseDirectory()
        internal virtual void CheckExpectedDatabaseDirectory()
        {
            Config config = Config.builder().withServerDefaults().withSetting(mode, Mode.SINGLE.name()).withSetting(GraphDatabaseSettings.neo4j_home, _testDirectory.storeDir().AbsolutePath).withSetting((new BoltConnector("bolt")).listen_address.name(), "localhost:0").withSetting((new BoltConnector("http")).listen_address.name(), "localhost:0").withSetting((new BoltConnector("https")).listen_address.name(), "localhost:0").build();
            GraphDatabaseDependencies dependencies = GraphDatabaseDependencies.newDependencies().userLogProvider(NullLogProvider.Instance);
            OpenEnterpriseNeoServer   server       = new OpenEnterpriseNeoServer(config, dependencies);

            server.Start();
            try
            {
                Path expectedPath         = Paths.get(_testDirectory.storeDir().Path, "data", "databases", "graph.db");
                GraphDatabaseFacade graph = server.Database.Graph;
                assertEquals(expectedPath, graph.DatabaseLayout().databaseDirectory().toPath());
            }
            finally
            {
                server.Stop();
            }
        }
Beispiel #9
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRestoreBySeedingAllMembers() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldRestoreBySeedingAllMembers()
        {
            // given
            GraphDatabaseService database = (new GraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDir.storeDir()).setConfig(GraphDatabaseSettings.allow_upgrade, Settings.TRUE).setConfig(GraphDatabaseSettings.record_format, HighLimit.NAME).setConfig(OnlineBackupSettings.online_backup_enabled, false.ToString()).newGraphDatabase();

            database.Shutdown();
            Config           config = Config.defaults(OnlineBackupSettings.online_backup_enabled, Settings.FALSE);
            DbRepresentation before = DbRepresentation.of(TestDir.storeDir(), config);

            // when
            _fsa.copyRecursively(TestDir.databaseDir(), _cluster.getCoreMemberById(0).databaseDirectory());
            _fsa.copyRecursively(TestDir.databaseDir(), _cluster.getCoreMemberById(1).databaseDirectory());
            _fsa.copyRecursively(TestDir.databaseDir(), _cluster.getCoreMemberById(2).databaseDirectory());
            _cluster.start();

            // then
            dataMatchesEventually(before, _cluster.coreMembers());
        }
Beispiel #10
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void respectLockFilesSameProcess() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void RespectLockFilesSameProcess()
        {
            GraphDatabaseService database = (new GraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).newGraphDatabase();
            StoreInfoCommand     command  = new StoreInfoCommand(System.out.println);

            try
            {
                command.Execute(new string[] { "--store", TestDirectory.storeDir().AbsolutePath });
                fail();
            }
            catch (CommandFailed e)
            {
                assertTrue(e.InnerException is StoreLockException);
            }
            finally
            {
                database.Shutdown();
            }
        }
Beispiel #11
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void SetUp()
        {
            _database = (new EnterpriseGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).setConfig(prometheusEnabled, Settings.TRUE).setConfig(prometheusEndpoint, "localhost:0").newGraphDatabase();
        }
Beispiel #12
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMonitorBolt() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldMonitorBolt()
        {
            // Given
            File metricsFolder = TestDirectory.directory("metrics");

            _db = ( GraphDatabaseAPI )(new TestGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).setConfig((new BoltConnector("bolt")).type, "BOLT").setConfig((new BoltConnector("bolt")).enabled, "true").setConfig((new BoltConnector("bolt")).listen_address, "localhost:0").setConfig(GraphDatabaseSettings.auth_enabled, "false").setConfig(MetricsSettings.MetricsEnabled, "false").setConfig(MetricsSettings.BoltMessagesEnabled, "true").setConfig(MetricsSettings.CsvEnabled, "true").setConfig(MetricsSettings.CsvInterval, "100ms").setConfig(MetricsSettings.CsvPath, metricsFolder.AbsolutePath).setConfig(OnlineBackupSettings.online_backup_enabled, Settings.FALSE).newGraphDatabase();

            // When
            _conn = (new SocketConnection()).connect(new HostnamePort("localhost", getBoltPort(_db))).send(_util.acceptedVersions(1, 0, 0, 0)).send(_util.chunk(new InitMessage("TestClient", map("scheme", "basic", "principal", "neo4j", "credentials", "neo4j"))));

            // Then
            assertEventually("session shows up as started", () => readLongValue(metricsCsv(metricsFolder, SESSIONS_STARTED)), equalTo(1L), 5, SECONDS);
            assertEventually("init request shows up as received", () => readLongValue(metricsCsv(metricsFolder, MESSAGES_RECEIVED)), equalTo(1L), 5, SECONDS);
            assertEventually("init request shows up as started", () => readLongValue(metricsCsv(metricsFolder, MESSAGES_STARTED)), equalTo(1L), 5, SECONDS);
            assertEventually("init request shows up as done", () => readLongValue(metricsCsv(metricsFolder, MESSAGES_DONE)), equalTo(1L), 5, SECONDS);

            assertEventually("queue time shows up", () => readLongValue(metricsCsv(metricsFolder, TOTAL_QUEUE_TIME)), greaterThanOrEqualTo(0L), 5, SECONDS);
            assertEventually("processing time shows up", () => readLongValue(metricsCsv(metricsFolder, TOTAL_PROCESSING_TIME)), greaterThanOrEqualTo(0L), 5, SECONDS);
        }
Beispiel #13
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSampleNotUniqueIndex() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldSampleNotUniqueIndex()
        {
            GraphDatabaseService db = null;
            long deletedNodes       = 0;

            try
            {
                // Given
                db = (new TestGraphDatabaseFactory()).newEmbeddedDatabase(TestDirectory.storeDir());
                IndexDefinition indexDefinition;
                using (Transaction tx = Db.beginTx())
                {
                    indexDefinition = Db.schema().indexFor(_label).on(_property).create();
                    tx.Success();
                }

                using (Transaction tx = Db.beginTx())
                {
                    Db.schema().awaitIndexOnline(indexDefinition, 10, TimeUnit.SECONDS);
                    tx.Success();
                }

                using (Transaction tx = Db.beginTx())
                {
                    for (int i = 0; i < _nodes; i++)
                    {
                        Db.createNode(_label).setProperty(_property, _names[i % _names.Length]);
                        tx.Success();
                    }
                }

                using (Transaction tx = Db.beginTx())
                {
                    for (int i = 0; i < (_nodes / 10); i++)
                    {
                        using (ResourceIterator <Node> nodes = Db.findNodes(_label, _property, _names[i % _names.Length]))
                        {
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                            nodes.next().delete();
                        }
                        deletedNodes++;
                        tx.Success();
                    }
                }
            }
            finally
            {
                if (db != null)
                {
                    Db.shutdown();
                }
            }

            // When
            TriggerIndexResamplingOnNextStartup();

            // Then

            // lucene will consider also the delete nodes, native won't
            Register_DoubleLongRegister register = FetchIndexSamplingValues(db);

            assertEquals(_names.Length, register.ReadFirst());
            assertThat(register.ReadSecond(), allOf(greaterThanOrEqualTo(nodes - deletedNodes), lessThanOrEqualTo(nodes)));

            // but regardless, the deleted nodes should not be considered in the index size value
            Register_DoubleLongRegister indexSizeRegister = FetchIndexSizeValues(db);

            assertEquals(0, indexSizeRegister.ReadFirst());
            assertEquals(nodes - deletedNodes, indexSizeRegister.ReadSecond());
        }
Beispiel #14
0
        private void SetupDb(GraphDatabaseSettings.SchemaIndex schemaIndex)
        {
            TestGraphDatabaseFactory dbFactory = new TestGraphDatabaseFactory();
            GraphDatabaseBuilder     builder   = dbFactory.NewEmbeddedDatabaseBuilder(_directory.storeDir()).setConfig(GraphDatabaseSettings.default_schema_provider, schemaIndex.providerName());

            _db = builder.NewGraphDatabase();
        }
Beispiel #15
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeEach void setUp()
        internal virtual void SetUp()
        {
            _database = (new GraphDatabaseFactory()).newEmbeddedDatabase(_testDirectory.storeDir());
        }
Beispiel #16
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void createBufferedIdComponentsByDefault()
        internal virtual void CreateBufferedIdComponentsByDefault()
        {
            GraphDatabaseAPI database = ( GraphDatabaseAPI )(new GraphDatabaseFactory()).newEmbeddedDatabase(_testDirectory.storeDir());

            try
            {
                DependencyResolver dependencyResolver = database.DependencyResolver;
                IdController       idController       = dependencyResolver.ResolveDependency(typeof(IdController));
                IdGeneratorFactory idGeneratorFactory = dependencyResolver.ResolveDependency(typeof(IdGeneratorFactory));

                assertThat(idController, instanceOf(typeof(BufferedIdController)));
                assertThat(idGeneratorFactory, instanceOf(typeof(BufferingIdGeneratorFactory)));
            }
            finally
            {
                database.Shutdown();
            }
        }
Beispiel #17
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup()
        public virtual void Setup()
        {
            _outputPath = TestDirectory.directory("metrics");
            _database   = (new EnterpriseGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).setConfig(csvPath, _outputPath.AbsolutePath).setConfig(csvRotationThreshold, "21").setConfig(csvMaxArchives, MAX_ARCHIVES.ToString()).setConfig(OnlineBackupSettings.online_backup_enabled, Settings.FALSE).newGraphDatabase();
        }
Beispiel #18
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotWriteDebugToInternalDiagnosticsLogByDefault() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldNotWriteDebugToInternalDiagnosticsLogByDefault()
        {
            // Given
            GraphDatabaseService db = (new TestGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDir.storeDir()).setConfig(GraphDatabaseSettings.logs_directory, TestDir.directory("logs").AbsolutePath).newGraphDatabase();

            // When
            LogService logService = (( GraphDatabaseAPI )db).DependencyResolver.resolveDependency(typeof(LogService));

            logService.GetInternalLog(this.GetType()).debug("A debug entry");

            Db.shutdown();
            File internalLog = new File(TestDir.directory("logs"), INTERNAL_LOG_FILE);

            // Then
            assertThat(internalLog.File, @is(true));
            assertThat(internalLog.length(), greaterThan(0L));

            assertEquals(0, CountOccurrences(internalLog, "A debug entry"));
        }
Beispiel #19
0
 private GraphDatabaseService GetDatabase(LogProvider logProvider)
 {
     return((new TestEnterpriseGraphDatabaseFactory()).setInternalLogProvider(logProvider).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).setConfig(OnlineBackupSettings.online_backup_enabled, Settings.FALSE).newGraphDatabase());
 }
Beispiel #20
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void Setup()
        {
            ServerHelper.cleanTheDatabase(_readOnlyServer);
            _readOnlyServer = ServerHelper.createReadOnlyServer(Dir.storeDir());
            _http           = HTTP.withBaseUri(_readOnlyServer.baseUri());
        }
Beispiel #21
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void SetUp()
        {
            _metricsDirectory = TestDirectory.directory("metrics");
            _database         = (new TestGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).setConfig(MetricsSettings.MetricsEnabled, Settings.FALSE).setConfig(MetricsSettings.NeoPageCacheEnabled, Settings.TRUE).setConfig(MetricsSettings.CsvEnabled, Settings.TRUE).setConfig(MetricsSettings.CsvInterval, "100ms").setConfig(MetricsSettings.CsvPath, _metricsDirectory.AbsolutePath).setConfig(OnlineBackupSettings.online_backup_enabled, Settings.FALSE).newGraphDatabase();
        }
Beispiel #22
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void compositeNodeKeyConstraintUpdate() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void CompositeNodeKeyConstraintUpdate()
        {
            GraphDatabaseService database = (new EnterpriseGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(TestDirectory.storeDir()).setConfig(OnlineBackupSettings.online_backup_enabled, Settings.FALSE).newGraphDatabase();

            Label label = Label.label("label");

            using (Transaction transaction = database.BeginTx())
            {
                Node node = database.CreateNode(label);
                node.SetProperty("b", ( short )3);
                node.SetProperty("a", new double[] { 0.6, 0.4, 0.2 });
                transaction.Success();
            }

            using (Transaction transaction = database.BeginTx())
            {
                string query = format("CREATE CONSTRAINT ON (n:%s) ASSERT (n.%s,n.%s) IS NODE KEY", label.Name(), "a", "b");
                database.Execute(query);
                transaction.Success();
            }

            AwaitIndex(database);

            using (Transaction transaction = database.BeginTx())
            {
                Node node = database.CreateNode(label);
                node.SetProperty("a", ( short )7);
                node.SetProperty("b", new double[] { 0.7, 0.5, 0.3 });
                transaction.Success();
            }
            database.Shutdown();

            ConsistencyCheckService.Result consistencyCheckResult = CheckDbConsistency(TestDirectory.storeDir());
            assertTrue("Database is consistent", consistencyCheckResult.Successful);
        }