AFAIU, VMs are special hosts, surf_exit try to free them before GC
kicks in. After many tries, decide to rename finalize as destroy and
call this method explicitly as before.
Msg.info("Let's shut down the simulation and kill everyone.");
for (int i = 0; i < vms.size(); i++) {
Msg.info("Let's shut down the simulation and kill everyone.");
for (int i = 0; i < vms.size(); i++) {
- vms.get(i).shutdown();
- vms.get(i).finalize();
}
Msg.info("Master done.");
}
}
Msg.info("Master done.");
}
Main.setEndOfTest();
Msg.info("Forcefully destroy VMs");
for (VM vm: vms)
Main.setEndOfTest();
Msg.info("Forcefully destroy VMs");
for (VM vm: vms)
Msg.info("Wait another 5 seconds. The tasks stop at some point in between");
waitFor(5);
Msg.info("Wait another 5 seconds. The tasks stop at some point in between");
waitFor(5);
- vmHost1.shutdown();
- vmHost3.shutdown();
- vmHost1.finalize();
- vmHost3.finalize();
+ vmHost1.destroy();
+ vmHost3.destroy();
- @Override
- public void finalize() {
+
+ public void destroy() {
- } catch (Throwable e) {
+ } catch (Exception e) {