no message
This commit is contained in:
@@ -1,18 +1,43 @@
|
|||||||
package Common.ModesSupervisors;
|
package Common.ModesSupervisors;
|
||||||
|
import Common.Global;
|
||||||
import Common.Utils.InterruptThread;
|
import Common.Utils.InterruptThread;
|
||||||
|
import Common.Utils.Utils;
|
||||||
|
import TestingSystem.Sapfor.Scenario_json;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
public class PackageModeSupervisor {
|
public class PackageModeSupervisor {
|
||||||
protected Thread interruptThread = new InterruptThread(5000, () -> {
|
Thread interruptThread = new InterruptThread(5000, () -> {
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
protected int kernels = 4;
|
//--->>
|
||||||
|
int free_kernels = 4;
|
||||||
|
int busy_kernels = 0;
|
||||||
|
//--->>
|
||||||
|
Scenario_json scenario;
|
||||||
|
//--->>
|
||||||
|
File packageWorkspace;
|
||||||
|
//--->>
|
||||||
|
File sapfor_drv;
|
||||||
|
File scenarioFile;
|
||||||
|
//--->>
|
||||||
public void Start() {
|
public void Start() {
|
||||||
try {
|
try {
|
||||||
interruptThread.start();
|
interruptThread.start();
|
||||||
// Pass_2021 pass = new PerformSapforTasksPackage();
|
//--->>
|
||||||
// pass.Do(Global.Home);
|
packageWorkspace = new File(Global.Home);
|
||||||
|
scenarioFile = new File(packageWorkspace, "scenario.txt");
|
||||||
|
sapfor_drv = new File(packageWorkspace, "SAPFOR_F.exe");
|
||||||
|
//--->>
|
||||||
|
String packed = FileUtils.readFileToString(scenarioFile, Charset.defaultCharset());
|
||||||
|
scenario = Utils.gson.fromJson(packed, Scenario_json.class);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//--->>
|
||||||
|
public void startTest() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user