You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java-dedup/README.md
+11-26Lines changed: 11 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,52 +6,37 @@ CI does not record this sample. The `keploy/` directory is checked in so the pip
6
6
7
7
The Java SDK reads JaCoCo coverage in-process via `org.jacoco.agent.rt.RT.getAgent().getExecutionData(...)`, so attaching the JaCoCo Java agent is enough — no TCP server, no port choice, no `--pass-through-ports`.
This produces `target/java-dedup-0.0.1-SNAPSHOT.jar` and copies `target/jacocoagent.jar` next to it.
16
+
This installs the sibling SDK snapshot locally, builds the sample, produces `target/java-dedup-0.0.1-SNAPSHOT.jar`, and copies `target/jacocoagent.jar` next to it.
Build the image (the Dockerfile already attaches the JaCoCo agent):
28
-
29
31
```bash
30
32
docker compose build
31
-
```
32
-
33
-
Replay with dedup:
34
-
35
-
```bash
36
33
keploy test \
37
34
-c "docker compose up" \
38
35
--container-name "dedup-java" \
39
-
--dedup --language java --delay 20
40
-
```
36
+
--dedup --language java --delay 20 \
37
+
--disableMockUpload --disableReportUpload
41
38
42
-
The Compose file bind-mounts host `/tmp` into the container so Keploy and the Java SDK share `/tmp/coverage_control.sock` and `/tmp/coverage_data.sock`.
43
-
44
-
### Restricted Docker
45
-
46
-
For a read-only root filesystem with dropped capabilities and `no-new-privileges`, overlay the restricted compose file:
Host `/tmp` is still bind-mounted so the SDK and Keploy share the dedup Unix sockets.
42
+
During `keploy test`, Enterprise rewrites the Compose file and injects its own shared `/tmp` volume for the dedup control/data sockets. The base sample Compose file does not need a host `/tmp` bind mount.
0 commit comments