Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void coreShouldStartWithSeedHavingPartialTransactionWriteCrash() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void CoreShouldStartWithSeedHavingPartialTransactionWriteCrash()
        {
            // given: a fully synced cluster with some data
            dataMatchesEventually(createEmptyNodes(_cluster, 10), _cluster.coreMembers());

            // when: shutting down a core
            CoreClusterMember core = _cluster.getCoreMemberById(0);

            core.Shutdown();

            // and making sure there will be something new to pull
            CoreClusterMember lastWrites = createEmptyNodes(_cluster, 10);

            // and writing a partial tx
            WritePartialTx(core.DatabaseDirectory());

            // and deleting the cluster state, making sure a snapshot is required during startup
            // effectively a seeding scenario -- representing the use of the unbind command on a crashed store
            _fs.deleteRecursively(core.ClusterStateDirectory());

            // then: we should still be able to start
            core.Start();

            // and become fully synced again
            dataMatchesEventually(lastWrites, singletonList(core));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void coreShouldStartAfterPartialTransactionWriteCrash() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void CoreShouldStartAfterPartialTransactionWriteCrash()
        {
            // given: a fully synced cluster with some data
            dataMatchesEventually(createEmptyNodes(_cluster, 10), _cluster.coreMembers());

            // when: shutting down a core
            CoreClusterMember core = _cluster.getCoreMemberById(0);

            core.Shutdown();

            // and making sure there will be something new to pull
            CoreClusterMember lastWrites = createEmptyNodes(_cluster, 10);

            // and writing a partial tx
            WritePartialTx(core.DatabaseDirectory());

            // then: we should still be able to start
            core.Start();

            // and become fully synced again
            dataMatchesEventually(lastWrites, singletonList(core));
        }