Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test LuceeDebug Agent

on: [ push, pull_request, workflow_dispatch ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build shadowJar
run: ./gradlew :luceedebug:shadowjar

# Docker is pre-installed on ubuntu-latest
- name: Run tests (Lucee 5, 6, 7 via Docker)
run: ./gradlew :luceedebug:test --info
timeout-minutes: 30

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
luceedebug/build/reports/tests/
luceedebug/build/test-results/
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;

import javax.servlet.ServletException;

import com.google.common.collect.MapMaker;
import com.sun.jdi.Bootstrap;
Expand Down Expand Up @@ -196,7 +195,7 @@ public PageContextAndOutputStream(PageContext pageContext, ByteArrayOutputStream
}

// is there a way to conjure up a new PageContext without having some other page context?
public static PageContextAndOutputStream ephemeralPageContextFromOther(PageContext pc) throws ServletException {
public static PageContextAndOutputStream ephemeralPageContextFromOther(PageContext pc) throws Exception {
final var outputStream = new ByteArrayOutputStream();
PageContext freshEphemeralPageContext = lucee.runtime.util.PageContextUtil.getPageContext(
/*Config config*/ pc.getConfig(),
Expand All @@ -205,7 +204,7 @@ public static PageContextAndOutputStream ephemeralPageContextFromOther(PageConte
/*String host*/ "",
/*String scriptName*/ "",
/*String queryString*/ "",
/*Cookie[] cookies*/ new javax.servlet.http.Cookie[] {},
/*Cookie[] cookies*/ null,
/*Map<String, Object> headers*/ new HashMap<>(),
/*Map<String, String> parameters*/ new HashMap<>(),
/*Map<String, Object> attributes*/ new HashMap<>(),
Expand Down
2 changes: 1 addition & 1 deletion test/docker/7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lucee/lucee:7.0.0.317-SNAPSHOT-nginx-tomcat11.0-jdk21-temurin-noble
FROM lucee/lucee:7.0.0.395-nginx-tomcat11.0-jdk21-temurin-noble

# "@LUCEEDEBUG_JAR" replaced programmatically with filename
ENV LUCEEDEBUG_JAR /build/@LUCEEDEBUG_JAR
Expand Down
Loading