diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/log/pruning/ThresholdConfigParserTest.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/log/pruning/ThresholdConfigParserTest.java new file mode 100644 index 0000000000000..9ab5f48a7119b --- /dev/null +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/log/pruning/ThresholdConfigParserTest.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2016 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.kernel.impl.transaction.log.pruning; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; +import static org.neo4j.kernel.impl.transaction.log.pruning.ThresholdConfigParser.ThresholdConfigValue; +import static org.neo4j.kernel.impl.transaction.log.pruning.ThresholdConfigParser.ThresholdConfigValue.NO_PRUNING; +import static org.neo4j.kernel.impl.transaction.log.pruning.ThresholdConfigParser.parse; + +public class ThresholdConfigParserTest +{ + @Test + public void parseTrue() throws Exception + { + ThresholdConfigValue aTrue = parse( "true" ); + assertEquals( NO_PRUNING.type, aTrue.type ); + assertEquals( NO_PRUNING.value, aTrue.value ); + } + + @Test + public void parseFalse() throws Exception + { + ThresholdConfigValue aFalse = parse( "false" ); + assertEquals( "entries", aFalse.type ); + assertEquals( 1, aFalse.value ); + } + + @Test(expected=IllegalArgumentException.class) + public void parseGarbage() throws Exception + { + parse( "davide" ); + fail("Expected IllegalArgumentException"); + } +} diff --git a/enterprise/core-edge/src/main/java/org/neo4j/coreedge/server/CoreEdgeClusterSettings.java b/enterprise/core-edge/src/main/java/org/neo4j/coreedge/server/CoreEdgeClusterSettings.java index 0d3596426b403..ffbafd5738172 100644 --- a/enterprise/core-edge/src/main/java/org/neo4j/coreedge/server/CoreEdgeClusterSettings.java +++ b/enterprise/core-edge/src/main/java/org/neo4j/coreedge/server/CoreEdgeClusterSettings.java @@ -173,7 +173,7 @@ public String toString() @Description( "RAFT log pruning strategy" ) public static final Setting raft_log_pruning = - setting( "core_edge.raft_log_pruning", STRING, "false" ); + setting( "core_edge.keep_raft_logs", STRING, "true" ); @Description( "RAFT log implementation" ) public static final Setting raft_log_implementation = diff --git a/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/NoPruningPruningStrategyTest.java b/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/NoPruningPruningStrategyTest.java index 6431222f652c2..32b985fcfe284 100644 --- a/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/NoPruningPruningStrategyTest.java +++ b/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/NoPruningPruningStrategyTest.java @@ -26,7 +26,7 @@ public class NoPruningPruningStrategyTest { @Test - public void shouldNotExludeAnySegmentPages() throws Exception + public void shouldNotExcludeAnySegmentPages() throws Exception { NoPruningPruningStrategy strategy = new NoPruningPruningStrategy(); diff --git a/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/SegmentedRaftLogPrunerTest.java b/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/SegmentedRaftLogPrunerTest.java deleted file mode 100644 index 2fa1e9fa8531c..0000000000000 --- a/enterprise/core-edge/src/test/java/org/neo4j/coreedge/raft/log/segmented/SegmentedRaftLogPrunerTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2002-2016 "Neo Technology," - * Network Engine for Objects in Lund AB [http://neotechnology.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.neo4j.coreedge.raft.log.segmented; - -import org.junit.Test; - -public class SegmentedRaftLogPrunerTest -{ - @Test - public void name() throws Exception - { - - } -}