@Override public synchronized void registerProbes(int classId, String methodName, String methodDesc, int firstProbe, int lastProbe) { this.dos.writeByte(Id.PROBES); this.dos.writeInt(classId); this.dos.writeString(methodName); this.dos.writeString(methodDesc); this.dos.writeInt(firstProbe); this.dos.writeInt(lastProbe); }
private void sendTests(final SafeDataOutputStream dos) { // send individually to reduce memory overhead of deserializing large // suite LOG.info("Sending " + this.testClasses.size() + " test classes to minion"); dos.writeInt(this.testClasses.size()); for (final String tc : this.testClasses) { dos.writeString(tc); } dos.flush(); LOG.info("Sent tests to minion"); } }
@Override public synchronized void registerClass(final int id, final String className) { this.dos.writeByte(Id.CLAZZ); this.dos.writeInt(id); this.dos.writeString(className); }
@Override public synchronized void recordTestOutcome(final Description description, final boolean wasGreen, final int executionTime) { final Collection<Long> hits = CodeCoverageStore.getHits(); this.dos.writeByte(Id.OUTCOME); this.dos.write(description); this.dos.writeInt(hits.size()); for (final Long each : hits) { this.dos.writeLong(each); } this.dos.writeBoolean(wasGreen); this.dos.writeInt(executionTime); }
public synchronized void end(final ExitCode exitCode) { this.dos.writeByte(Id.DONE); this.dos.writeInt(exitCode.getCode()); this.dos.flush(); }
@Override public synchronized void done(final ExitCode exitCode) { this.w.writeByte(Id.DONE); this.w.writeInt(exitCode.getCode()); this.w.flush(); }
@Test public void shouldSendTestClassesToMinion() { this.testClasses.add("foo"); this.testClasses.add("bar"); this.testee.apply(this.os); verify(this.os).writeInt(this.testClasses.size()); verify(this.os).writeString("foo"); verify(this.os).writeString("bar"); }
private void mockClientSocketToSendExitCode(final ExitCode timeout) throws IOException { final SafeDataOutputStream dos = new SafeDataOutputStream(this.o); dos.writeByte(Id.DONE); dos.writeInt(timeout.getCode()); mockClientSocketInputStream(); }
@Test public void shouldPassCommandsToReceiver() throws Exception { final SafeDataOutputStream dos = new SafeDataOutputStream(this.o); dos.writeByte(Id.DESCRIBE); dos.writeByte(Id.DONE); dos.writeInt(ExitCode.OK.getCode()); mockClientSocketInputStream(); this.testee.call(); verify(this.receiveStrategy, times(1)).apply(anyByte(), any(SafeDataInputStream.class)); }
@Override public synchronized void registerProbes(int classId, String methodName, String methodDesc, int firstProbe, int lastProbe) { this.dos.writeByte(Id.PROBES); this.dos.writeInt(classId); this.dos.writeString(methodName); this.dos.writeString(methodDesc); this.dos.writeInt(firstProbe); this.dos.writeInt(lastProbe); }
@Override public synchronized void registerClass(final int id, final String className) { this.dos.writeByte(Id.CLAZZ); this.dos.writeInt(id); this.dos.writeString(className); }
@Override public synchronized void recordTestOutcome(final Description description, final boolean wasGreen, final int executionTime) { final Collection<Long> hits = CodeCoverageStore.getHits(); this.dos.writeByte(Id.OUTCOME); this.dos.write(description); this.dos.writeInt(hits.size()); for (final Long each : hits) { this.dos.writeLong(each); } this.dos.writeBoolean(wasGreen); this.dos.writeInt(executionTime); }
@Override public synchronized void done(final ExitCode exitCode) { this.w.writeByte(Id.DONE); this.w.writeInt(exitCode.getCode()); this.w.flush(); }
public synchronized void end(final ExitCode exitCode) { this.dos.writeByte(Id.DONE); this.dos.writeInt(exitCode.getCode()); this.dos.flush(); }