This commit is contained in:
2025-02-12 23:24:54 +03:00
parent 57baa6c9c1
commit 90b6f3648e
3 changed files with 12 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import Common.Utils.Utils_;
import _VisualDVM.Constants;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.Tasks.TaskState;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.Passes.Server.TestingServerPass;
import _VisualDVM.Repository.Server.ServerCode;
import _VisualDVM.TestingSystem.Common.TasksPackageState;
@@ -55,6 +56,7 @@ public class RefreshDVMPackageResults extends TestingServerPass<DVMPackage> {
for (DVMCompilationTask compilationTask : target.package_json.compilationTasks)
for (DVMRunTask runTask : compilationTask.runTasks) {
ShowProgress(runTasks.size(), i, true);
++i;
rt_count++;
if (compilationTask.state != TaskState.Done) {
runTask.state = TaskState.Canceled;
@@ -115,5 +117,11 @@ public class RefreshDVMPackageResults extends TestingServerPass<DVMPackage> {
Utils_.fileToBytes(target.getJsonFile())
)
);
Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
}
@Override
protected void showFinish() throws Exception {
super.showFinish();
Global.testingServer.db.dvmPackages.getUI().SetCurrentByPK(target.id);
}
}

View File

@@ -565,7 +565,9 @@ public class Utils {
if (errors > 0) {
state = TaskState.DoneWithErrors;
} else {
complete = total;
if (complete==0){
complete = total = 1;
}
state = TaskState.Done;
}
return new Pair<>(state, (int) ((((double) complete) / total) * 100));