From e66f25ad5b45ab99bdca9fb6cbb141152f696f83 Mon Sep 17 00:00:00 2001 From: fickludd Date: Fri, 21 Dec 2018 12:37:52 +0100 Subject: [PATCH] minor review fixes --- .../internal/collector/DataCollectorMatchers.scala | 2 +- .../org/neo4j/internal/collector/QueryCollector.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/community/community-it/cypher-it/src/test/scala/org/neo4j/internal/collector/DataCollectorMatchers.scala b/community/community-it/cypher-it/src/test/scala/org/neo4j/internal/collector/DataCollectorMatchers.scala index 1101330a548da..dca6288c168fa 100644 --- a/community/community-it/cypher-it/src/test/scala/org/neo4j/internal/collector/DataCollectorMatchers.scala +++ b/community/community-it/cypher-it/src/test/scala/org/neo4j/internal/collector/DataCollectorMatchers.scala @@ -244,7 +244,7 @@ object DataCollectorMatchers { case _ => false }, rawFailureMessage = s"'$left' is not the same Cypher as '$expected'", - rawNegatedFailureMessage = "") + rawNegatedFailureMessage = s"'$left' is unexpectedly the same Cypher as '$expected'") override def toString(): String = s"cypher string `$expected`" } diff --git a/community/data-collector/src/main/java/org/neo4j/internal/collector/QueryCollector.java b/community/data-collector/src/main/java/org/neo4j/internal/collector/QueryCollector.java index 1c6d8bafc03ba..5a84047e700c1 100644 --- a/community/data-collector/src/main/java/org/neo4j/internal/collector/QueryCollector.java +++ b/community/data-collector/src/main/java/org/neo4j/internal/collector/QueryCollector.java @@ -39,12 +39,12 @@ */ class QueryCollector extends CollectorStateMachine> implements QueryExecutionMonitor { - private volatile boolean on; + private volatile boolean isCollecting; private final ConcurrentLinkedQueue queries; QueryCollector() { - on = false; + isCollecting = false; queries = new ConcurrentLinkedQueue<>(); } @@ -53,14 +53,14 @@ class QueryCollector extends CollectorStateMachine> impl @Override Result doCollect() { - on = true; + isCollecting = true; return success( "Collection started." ); } @Override Result doStop() { - on = false; + isCollecting = false; return success( "Collection stopped." ); } @@ -87,7 +87,7 @@ public void endFailure( ExecutingQuery query, Throwable failure ) @Override public void endSuccess( ExecutingQuery query ) { - if ( on ) + if ( isCollecting ) { queries.add( query.snapshot() ); }