Search in sources :

Example 6 with DefaultProcessCommands

use of org.sonar.process.sharedmemoryfile.DefaultProcessCommands in project sonarqube by SonarSource.

the class ProcessCommandWrapperImplTest method notifyOperational_updates_shareMemory_file.

@Test
public void notifyOperational_updates_shareMemory_file() throws IOException {
    File tmpDir = temp.newFolder().getAbsoluteFile();
    settings.setProperty(PROPERTY_SHARED_PATH, tmpDir.getAbsolutePath());
    settings.setProperty(PROPERTY_PROCESS_INDEX, PROCESS_NUMBER);
    ProcessCommandWrapperImpl underTest = new ProcessCommandWrapperImpl(settings.asConfig());
    underTest.notifyOperational();
    try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(tmpDir, PROCESS_NUMBER)) {
        assertThat(processCommands.isOperational()).isTrue();
    }
}
Also used : DefaultProcessCommands(org.sonar.process.sharedmemoryfile.DefaultProcessCommands) File(java.io.File) Test(org.junit.Test)

Aggregations

DefaultProcessCommands (org.sonar.process.sharedmemoryfile.DefaultProcessCommands)6 File (java.io.File)5 Test (org.junit.Test)4 Random (java.util.Random)1