Skip to content

Commit

Permalink
minor review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fickludd committed Dec 28, 2018
1 parent c73e3a7 commit e66f25a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -244,7 +244,7 @@ object DataCollectorMatchers {
case _ => false case _ => false
}, },
rawFailureMessage = s"'$left' is not the same Cypher as '$expected'", 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`" override def toString(): String = s"cypher string `$expected`"
} }
Expand Down
Expand Up @@ -39,12 +39,12 @@
*/ */
class QueryCollector extends CollectorStateMachine<Iterator<QuerySnapshot>> implements QueryExecutionMonitor class QueryCollector extends CollectorStateMachine<Iterator<QuerySnapshot>> implements QueryExecutionMonitor
{ {
private volatile boolean on; private volatile boolean isCollecting;
private final ConcurrentLinkedQueue<QuerySnapshot> queries; private final ConcurrentLinkedQueue<QuerySnapshot> queries;


QueryCollector() QueryCollector()
{ {
on = false; isCollecting = false;
queries = new ConcurrentLinkedQueue<>(); queries = new ConcurrentLinkedQueue<>();
} }


Expand All @@ -53,14 +53,14 @@ class QueryCollector extends CollectorStateMachine<Iterator<QuerySnapshot>> impl
@Override @Override
Result doCollect() Result doCollect()
{ {
on = true; isCollecting = true;
return success( "Collection started." ); return success( "Collection started." );
} }


@Override @Override
Result doStop() Result doStop()
{ {
on = false; isCollecting = false;
return success( "Collection stopped." ); return success( "Collection stopped." );
} }


Expand All @@ -87,7 +87,7 @@ public void endFailure( ExecutingQuery query, Throwable failure )
@Override @Override
public void endSuccess( ExecutingQuery query ) public void endSuccess( ExecutingQuery query )
{ {
if ( on ) if ( isCollecting )
{ {
queries.add( query.snapshot() ); queries.add( query.snapshot() );
} }
Expand Down

0 comments on commit e66f25a

Please sign in to comment.