示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void checkPointIsInitiallyNotNeededIfWeHaveNoLogsToPrune()
        public virtual void CheckPointIsInitiallyNotNeededIfWeHaveNoLogsToPrune()
        {
            WithPolicy("volumetric");
            _haveLogsToPrune = false;
            CheckPointThreshold threshold = CreateThreshold();

            threshold.Initialize(2);
            assertFalse(threshold.IsCheckPointingNeeded(2, NotTriggered));
            VerifyNoMoreTriggers();
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void checkPointIsNeededIfWeMightHaveLogsToPrune()
        public virtual void CheckPointIsNeededIfWeMightHaveLogsToPrune()
        {
            WithPolicy("volumetric");
            _haveLogsToPrune = true;
            CheckPointThreshold threshold = CreateThreshold();

            threshold.Initialize(2);
            assertTrue(threshold.IsCheckPointingNeeded(2, Triggered));
            VerifyTriggered("log pruning");
            VerifyNoMoreTriggers();
        }
示例#3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("ConstantConditions") @Test public void continuousPolicyMustTriggerCheckPointsAfterAnyWriteTransaction()
        public virtual void ContinuousPolicyMustTriggerCheckPointsAfterAnyWriteTransaction()
        {
            WithPolicy("continuous");
            CheckPointThreshold threshold = CreateThreshold();

            threshold.Initialize(2);

            assertThat(threshold.CheckFrequencyMillis(), lessThan(Org.Neo4j.Kernel.impl.transaction.log.checkpoint.CheckPointThreshold_Fields.DefaultCheckingFrequencyMillis));

            assertFalse(threshold.IsCheckPointingNeeded(2, Triggered));
            threshold.CheckPointHappened(3);
            assertFalse(threshold.IsCheckPointingNeeded(3, Triggered));
            assertTrue(threshold.IsCheckPointingNeeded(4, Triggered));
            VerifyTriggered("continuous");
            VerifyNoMoreTriggers();
        }