From 43fa315abd62f0c07e1f5220c2539a58c0819097 Mon Sep 17 00:00:00 2001 From: Dave L Date: Sat, 10 Jan 2026 11:20:39 -0800 Subject: [PATCH 1/3] Bugfix: Check if ColdboxVirtualApp Exists Before Shutdown If you set `this.unLoadColdbox = true; ` in your tests, there won't be a `ColdboxVirtualApp` in the `request` scope and the page will throw an exception "The key [COLDBOXVIRTUALAPP] does not exist in the request scope, the structure is empty" --- test-harness/tests/Application.cfc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test-harness/tests/Application.cfc b/test-harness/tests/Application.cfc index eeecba5..193b8b8 100644 --- a/test-harness/tests/Application.cfc +++ b/test-harness/tests/Application.cfc @@ -74,7 +74,9 @@ component{ } public void function onRequestEnd( required targetPage ) { - request.coldBoxVirtualApp.shutdown(); + if ( request.keyExists( "coldBoxVirtualApp" ) ) { + request.coldBoxVirtualApp.shutdown(); + } } private boolean function shouldEnableFullNullSupport() { From a43e599bbdc11fbbb306b2a1c567d22a1c62d355 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 20 Jan 2026 12:58:45 +0100 Subject: [PATCH 2/3] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- test-harness/tests/Application.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-harness/tests/Application.cfc b/test-harness/tests/Application.cfc index 193b8b8..dcc6202 100644 --- a/test-harness/tests/Application.cfc +++ b/test-harness/tests/Application.cfc @@ -74,7 +74,7 @@ component{ } public void function onRequestEnd( required targetPage ) { - if ( request.keyExists( "coldBoxVirtualApp" ) ) { + if ( request.keyExists( "coldBoxVirtualApp" ) ) { request.coldBoxVirtualApp.shutdown(); } } From f8af3233ce5a780a54adc7588cb698723360316f Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 20 Jan 2026 12:58:54 +0100 Subject: [PATCH 3/3] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- test-harness/tests/Application.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-harness/tests/Application.cfc b/test-harness/tests/Application.cfc index dcc6202..d7c84cb 100644 --- a/test-harness/tests/Application.cfc +++ b/test-harness/tests/Application.cfc @@ -75,8 +75,8 @@ component{ public void function onRequestEnd( required targetPage ) { if ( request.keyExists( "coldBoxVirtualApp" ) ) { - request.coldBoxVirtualApp.shutdown(); - } + request.coldBoxVirtualApp.shutdown(); + } } private boolean function shouldEnableFullNullSupport() {