Skip to content

Commit b6adc85

Browse files
committed
Use a custom unit_tester wasm plugin to implement the jaxrs unit tests.
This help find and fix some additional issues: * ReaderInterceptor would be called if jaxrs method did not use the body. * We now resume paused http context when a local http response is sent. Signed-off-by: Hiram Chirino <hiram@hiramchirino.com>
1 parent c1e8b7f commit b6adc85

File tree

47 files changed

+812
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+812
-222
lines changed

proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/Helpers.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public static int int32(byte[] bytes) {
6262
}
6363

6464
public static String string(byte[] value) {
65+
if (value == null) {
66+
return null;
67+
}
6568
return new String(value, StandardCharsets.UTF_8);
6669
}
6770

proxy-wasm-java-host/src/test/go-examples/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ docker run -it --rm \
77
-e GOARCH=wasm golang:1.24-alpine sh -c "
88
find . -mindepth 1 -type f -name 'main.go' \
99
| xargs -I {} sh -c 'dirname {}' \
10-
| xargs -I {} sh -c 'cd {} && GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o main.wasm ./main.go'
10+
| xargs -I {} sh -c 'cd {} && GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o main.wasm .'
1111
"
Binary file not shown.
Binary file not shown.
109 Bytes
Binary file not shown.
Binary file not shown.
106 Bytes
Binary file not shown.
118 Bytes
Binary file not shown.
127 Bytes
Binary file not shown.
113 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)