Add tests from develop

Added tests from develop. The test results need to be modified for 2.0.
This commit is contained in:
Markus Mäkelä
2017-05-26 15:40:40 +03:00
parent ad109408b5
commit d7d4ec29bb
596 changed files with 48543 additions and 0 deletions

View File

@ -0,0 +1,39 @@
package maxscale.java;
import java.io.File;
/**
* MaxScale configuration class
*
* Configures MaxScale for testing
*/
public class MaxScaleConfiguration {
private static final String TEST_DIR = "@CMAKE_SOURCE_DIR@";
private static final String CONFIG_COMMAND = TEST_DIR + "/non_native_setup";
private static final String LOGS_COMMAND = TEST_DIR + "/copy_logs.sh";
private String test = null;
public MaxScaleConfiguration(String test) throws Exception
{
this.test = test;
ProcessBuilder pb = new ProcessBuilder(CONFIG_COMMAND, test);
pb.inheritIO();
pb.directory(new File(TEST_DIR));
pb.environment().put("test_dir", TEST_DIR);
Process process = pb.start();
process.waitFor();
}
public void close() {
try {
ProcessBuilder pb = new ProcessBuilder(LOGS_COMMAND, test);
pb.inheritIO();
pb.directory(new File(TEST_DIR));
Process process = pb.start();
process.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
}
}