From 733f482e53956b4930b3d6d4bf77c67b2a8c011a Mon Sep 17 00:00:00 2001 From: Anton Persson Date: Wed, 21 Jun 2017 12:24:53 +0200 Subject: [PATCH] Cleanup --- .../checking/index/IndexAccessors.java | 1 + .../consistency/report/ConsistencyReport.java | 2 +- .../ConsistencyCheckServiceIntegrationTest.java | 16 +++------------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/community/consistency-check/src/main/java/org/neo4j/consistency/checking/index/IndexAccessors.java b/community/consistency-check/src/main/java/org/neo4j/consistency/checking/index/IndexAccessors.java index 49aacdd10fa75..592a989eefd3f 100644 --- a/community/consistency-check/src/main/java/org/neo4j/consistency/checking/index/IndexAccessors.java +++ b/community/consistency-check/src/main/java/org/neo4j/consistency/checking/index/IndexAccessors.java @@ -109,5 +109,6 @@ public void close() throws IOException } accessors.clear(); onlineIndexRules.clear(); + notOnlineIndexRules.clear(); } } diff --git a/community/consistency-check/src/main/java/org/neo4j/consistency/report/ConsistencyReport.java b/community/consistency-check/src/main/java/org/neo4j/consistency/report/ConsistencyReport.java index 15ceca358ed3b..af0c004a6ce90 100644 --- a/community/consistency-check/src/main/java/org/neo4j/consistency/report/ConsistencyReport.java +++ b/community/consistency-check/src/main/java/org/neo4j/consistency/report/ConsistencyReport.java @@ -158,7 +158,7 @@ interface SchemaConsistencyReport extends ConsistencyReport void unsupportedSchemaRuleKind( SchemaRule.Kind kind ); @Warning - @Documented( "The schema rule contained in the DynamicRecord chain a reference to a schema rule that is not online. It will be rebuilt on next startup." ) + @Documented( "The schema rule contained in the DynamicRecord chain has a reference to a schema rule that is not online." ) void schemaRuleNotOnline( SchemaRule schemaRule ); } diff --git a/community/consistency-check/src/test/java/org/neo4j/consistency/ConsistencyCheckServiceIntegrationTest.java b/community/consistency-check/src/test/java/org/neo4j/consistency/ConsistencyCheckServiceIntegrationTest.java index b9e6ffc94fcb0..98dd4cd6f7178 100644 --- a/community/consistency-check/src/test/java/org/neo4j/consistency/ConsistencyCheckServiceIntegrationTest.java +++ b/community/consistency-check/src/test/java/org/neo4j/consistency/ConsistencyCheckServiceIntegrationTest.java @@ -253,22 +253,12 @@ public void shouldReportMissingSchemaIndex() throws Exception private File findFile( String targetFile, File directory ) { - File foundFile = null; - boolean didFindFile = false; - for ( File file : directory.listFiles() ) - { - if ( file.getName().equals( targetFile ) ) - { - foundFile = file; - didFindFile = true; - break; - } - } - if ( !didFindFile ) + File file = new File( directory, targetFile ); + if ( !file.exists() ) { fail( "Could not find file " + targetFile ); } - return foundFile; + return file; } private GraphDatabaseService getGraphDatabaseService()