-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
94 additions
and
128 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
pitest-entry/src/main/java/org/pitest/coverage/execute/CoverageCommunicationThread.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 0 additions & 99 deletions
99
...-entry/src/main/java/org/pitest/mutationtest/execute/MutationTestCommunicationThread.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
pitest-entry/src/main/java/org/pitest/mutationtest/execute/Receive.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.pitest.mutationtest.execute; | ||
|
||
import org.pitest.mutationtest.DetectionStatus; | ||
import org.pitest.mutationtest.MutationStatusTestPair; | ||
import org.pitest.mutationtest.engine.MutationIdentifier; | ||
import org.pitest.util.Id; | ||
import org.pitest.util.Log; | ||
import org.pitest.util.ReceiveStrategy; | ||
import org.pitest.util.SafeDataInputStream; | ||
|
||
import java.util.Map; | ||
import java.util.logging.Logger; | ||
|
||
class Receive implements ReceiveStrategy { | ||
private static final Logger LOG = Log.getLogger(); | ||
|
||
private final Map<MutationIdentifier, MutationStatusTestPair> idMap; | ||
|
||
Receive(final Map<MutationIdentifier, MutationStatusTestPair> idMap) { | ||
this.idMap = idMap; | ||
} | ||
|
||
@Override | ||
public void apply(final byte control, final SafeDataInputStream is) { | ||
switch (control) { | ||
case Id.DESCRIBE: | ||
handleDescribe(is); | ||
break; | ||
case Id.REPORT: | ||
handleReport(is); | ||
break; | ||
} | ||
} | ||
|
||
private void handleReport(final SafeDataInputStream is) { | ||
final MutationIdentifier mutation = is.read(MutationIdentifier.class); | ||
final MutationStatusTestPair value = is | ||
.read(MutationStatusTestPair.class); | ||
this.idMap.put(mutation, value); | ||
LOG.fine(mutation + " " + value); | ||
} | ||
|
||
private void handleDescribe(final SafeDataInputStream is) { | ||
final MutationIdentifier mutation = is.read(MutationIdentifier.class); | ||
this.idMap.put(mutation, MutationStatusTestPair.notAnalysed(1, | ||
DetectionStatus.STARTED)); | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
pitest-entry/src/main/java/org/pitest/mutationtest/execute/SendData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.pitest.mutationtest.execute; | ||
|
||
import org.pitest.util.SafeDataOutputStream; | ||
|
||
import java.util.function.Consumer; | ||
|
||
class SendData implements Consumer<SafeDataOutputStream> { | ||
private final MinionArguments arguments; | ||
|
||
SendData(final MinionArguments arguments) { | ||
this.arguments = arguments; | ||
} | ||
|
||
@Override | ||
public void accept(final SafeDataOutputStream dos) { | ||
dos.write(this.arguments); | ||
dos.flush(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters