Keep Glass attached through target-worker shutdown
Early Platform.exit detached JavaFX while queued macOS activation callbacks still called Java. Close the owned example before terminating its JVM, make shutdown idempotent, and reject late preview work. Add real startup-cancellation regressions and native crash-report checks.
This commit is contained in:
@@ -8,6 +8,7 @@ import subprocess
|
||||
import tempfile
|
||||
import json
|
||||
import time
|
||||
from native_crashes import NativeCrashGuard
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
@@ -16,6 +17,7 @@ parser.add_argument("--idea-home", required=True)
|
||||
args = parser.parse_args()
|
||||
logs = ROOT / "target/connected-workflow"
|
||||
logs.mkdir(parents=True, exist_ok=True)
|
||||
crashes = NativeCrashGuard(ROOT)
|
||||
classpath = os.pathsep.join([str(ROOT / "designer-standalone/target/test-classes"),
|
||||
str(ROOT / "designer-standalone/target/classes"),
|
||||
(ROOT / "designer-standalone/target/smoke-classpath.txt").read_text().strip()])
|
||||
@@ -41,6 +43,9 @@ with tempfile.TemporaryDirectory(prefix="designer-connected-") as temporary:
|
||||
run(host + "-" + mode, [Path(os.environ["JAVA_HOME"]) / "bin/java", "-cp", classpath,
|
||||
"de.neitzel.fxdesigner.standalone.WorkflowSmoke", ROOT, args.target_java_home,
|
||||
fixture, mode])
|
||||
run("worker-lifecycle-" + mode, [Path(os.environ["JAVA_HOME"]) / "bin/java", "-cp", classpath,
|
||||
"de.neitzel.fxdesigner.standalone.WorkerLifecycleSmoke", ROOT, fixture])
|
||||
crashes.check()
|
||||
local = fixture / ".neitzel-fx-designer"
|
||||
(local / "runtimes.json").write_text(json.dumps({"schemaVersion":"1.0","runtimes":{"java21":{"build":args.target_java_home,"target":args.target_java_home}}}))
|
||||
tools = [ROOT / ("designer-" + name) / "target" / ("designer-" + name + "-0.1.0-SNAPSHOT.jar") for name in ("target-tools","contracts","preview-api")]
|
||||
@@ -82,3 +87,5 @@ with tempfile.TemporaryDirectory(prefix="designer-connected-") as temporary:
|
||||
"-PideaHome=" + args.idea_home, "-Ddesigner.workflow.fixtures=" + str(base),
|
||||
"-Ddesigner.repository=" + str(ROOT), "-Ddesigner.target.java=" + args.target_java_home,
|
||||
"test"])
|
||||
|
||||
crashes.check()
|
||||
|
||||
Reference in New Issue
Block a user