use of org.sonar.application.command.JvmOptions in project sonarqube by SonarSource.
the class ProcessLauncherImplTest method temporary_properties_file_can_be_avoided.
@Test
public void temporary_properties_file_can_be_avoided() throws Exception {
File tempDir = temp.newFolder();
TestProcessBuilder processBuilder = new TestProcessBuilder();
ProcessLauncher underTest = new ProcessLauncherImpl(tempDir, commands, () -> processBuilder);
JavaCommand<JvmOptions<?>> command = new JavaCommand<>(ProcessId.WEB_SERVER, temp.newFolder());
command.setReadsArgumentsFromFile(false);
command.setArgument("foo", "bar");
command.setArgument("baz", "woo");
command.setJvmOptions(new JvmOptions<>());
underTest.launch(command);
String propsFilePath = processBuilder.commands.get(processBuilder.commands.size() - 1);
File file = new File(propsFilePath);
assertThat(file).doesNotExist();
}
Aggregations