Skip to content

Commit

Permalink
Merge pull request #727 from hcoles/initializer_coverage
Browse files Browse the repository at this point in the history
Fix for #726 - clear coverage directly after test
  • Loading branch information
hcoles authored Jan 22, 2020
2 parents 45ca569 + 4ece2eb commit a387080
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

public interface CoverageReceiver extends InvokeReceiver {

void newTest();

void recordTestOutcome(Description description, boolean wasGreen,
int executionTime);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ protected CoverageDecorator(final CoverageReceiver queue, final TestUnit child)
@Override
public void execute(final ResultCollector rc) {
LOG.fine("Gathering coverage for test " + child().getDescription());
this.invokeQueue.newTest();

final int threadsBeforeTest = this.threads.getThreadCount();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ public CoveragePipe(final OutputStream dos) {
this.dos = new SafeDataOutputStream(dos);
}

@Override
public synchronized void newTest() {
CodeCoverageStore.reset();
}

@Override
public synchronized void recordTestOutcome(final Description description,
final boolean wasGreen, final int executionTime) {
Expand All @@ -38,6 +33,8 @@ public synchronized void recordTestOutcome(final Description description,
}
this.dos.writeBoolean(wasGreen);
this.dos.writeInt(executionTime);

CodeCoverageStore.reset();

}

Expand Down

0 comments on commit a387080

Please sign in to comment.