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
},
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`"
}
Expand Down
Expand Up @@ -39,12 +39,12 @@
*/
class QueryCollector extends CollectorStateMachine<Iterator<QuerySnapshot>> implements QueryExecutionMonitor
{
private volatile boolean on;
private volatile boolean isCollecting;
private final ConcurrentLinkedQueue<QuerySnapshot> queries;

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

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

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

Expand All @@ -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() );
}
Expand Down

0 comments on commit e66f25a

Please sign in to comment.