Skip to content

Commit

Permalink
remove some log suppression
Browse files Browse the repository at this point in the history
It was suprising to have this in place, better to fix the root
cause of wrongful printing.
  • Loading branch information
martinfurmanski committed Feb 28, 2017
1 parent ab3923f commit 922768d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import org.neo4j.kernel.lifecycle.LifecycleException;
import org.neo4j.logging.NullLogProvider;
import org.neo4j.test.causalclustering.ClusterRule;
import org.neo4j.test.rule.SuppressOutput;
import org.neo4j.test.rule.fs.DefaultFileSystemRule;

import static org.hamcrest.CoreMatchers.instanceOf;
Expand All @@ -57,11 +56,9 @@
import static org.neo4j.causalclustering.core.server.CoreServerModule.CLUSTER_ID_NAME;
import static org.neo4j.graphdb.Label.label;
import static org.neo4j.kernel.impl.store.MetaDataStore.Position.RANDOM_NUMBER;
import static org.neo4j.test.rule.SuppressOutput.suppress;

public class ClusterBindingIT
{
private final SuppressOutput suppressOutput = suppress( SuppressOutput.System.err );
private final ClusterRule clusterRule = new ClusterRule( ClusterBindingIT.class )
.withNumberOfCoreMembers( 3 )
.withNumberOfReadReplicas( 0 )
Expand All @@ -70,8 +67,7 @@ public class ClusterBindingIT
private final DefaultFileSystemRule fileSystemRule = new DefaultFileSystemRule();

@Rule
public RuleChain ruleChain = RuleChain.outerRule( suppressOutput )
.around( fileSystemRule ).around( clusterRule );
public RuleChain ruleChain = RuleChain.outerRule( fileSystemRule ).around( clusterRule );

private Cluster cluster;
private FileSystemAbstraction fs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.security.WriteOperationsNotAllowedException;
import org.neo4j.test.causalclustering.ClusterRule;
import org.neo4j.test.rule.SuppressOutput;

import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertEquals;
Expand All @@ -50,10 +49,8 @@
public class CoreReplicationIT
{
@Rule
public final ClusterRule clusterRule = new ClusterRule( getClass() )
.withNumberOfCoreMembers( 3 ).withNumberOfReadReplicas( 0 );
@Rule
public SuppressOutput suppressOutput = SuppressOutput.suppressAll();
public final ClusterRule clusterRule =
new ClusterRule( getClass() ).withNumberOfCoreMembers( 3 ).withNumberOfReadReplicas( 0 );

private Cluster cluster;

Expand Down Expand Up @@ -289,10 +286,11 @@ public void shouldBeAbleToShutdownWhenTheLeaderIsTryingToReplicateTransaction()
cluster.removeCoreMember( cluster.getDbWithAnyRole( Role.FOLLOWER, Role.CANDIDATE ) );
latch.countDown();
} );
fail( "Should have thrown" );
}
catch ( Exception e )
catch ( Exception ignored )
{
throw new RuntimeException( e );
// expected
}
} );

Expand Down

0 comments on commit 922768d

Please sign in to comment.