use of com.facebook.buck.util.FakeProcessExecutor in project buck by facebook.
the class WorkerProcessProtocolZeroTest method setUp.
@Before
public void setUp() throws IOException {
ProcessExecutorParams fakeParams = ProcessExecutorParams.ofCommand("");
fakeProcess = new FakeProcess(0);
fakeProcessExecutor = new FakeProcessExecutor(ImmutableMap.of(fakeParams, fakeProcess));
fakeLaunchedProcess = fakeProcessExecutor.launchProcess(fakeParams);
dummyJsonWriter = new JsonWriter(new StringWriter());
dummyJsonReader = new JsonReader(new StringReader(""));
}
use of com.facebook.buck.util.FakeProcessExecutor in project buck by facebook.
the class WorkerProcessTest method testClose.
@Test
public void testClose() throws IOException {
FakeWorkerProcessProtocol protocol = new FakeWorkerProcessProtocol();
WorkerProcess process = new WorkerProcess(new FakeProcessExecutor(), createDummyParams(), new FakeProjectFilesystem(), Paths.get("tmp").toAbsolutePath().normalize());
process.setProtocol(protocol);
assertFalse(protocol.isClosed());
process.close();
assertTrue(protocol.isClosed());
}
Aggregations