Skip to content

Commit dc3593f

Browse files
committed
ci: equivalence — pass output-directory (not database/) as java DbFork -d
Third latent bug the vacuous skip had hidden, now that the gate runs: java DbFork failed with IO error: .../002/database/database/witness/LOCK: No such file or directory ^^^^^^^^^^^^^^^^ doubled The test passed `-d <scratch>/database`, but java DbFork's -d is the output-directory (the PARENT of database/) — DbTool.getDB appends `database/<store>` internally (DbFork.java:120). So java looked in <scratch>/database/database/<store> and failed to open the LOCK. The Go side already uses the parent (Apply(scratchGo) opens scratchGo/database/<store>), and diffStore reads via OpenLevelDB(<parent>, store) — so only java's -d was wrong. This was never exercised before because the gate skipped on the missing jar. Fix: pass scratchJava (the output-directory parent) as -d. The Go Apply ran cleanly in the failed run (its TRC20-skip logs are present); this unblocks java so the run reaches the actual 8-store diff.
1 parent 81c9ad0 commit dc3593f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

internal/dbfork/equivalence_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,15 @@ func TestEquivalence_GoVsJava(t *testing.T) {
146146
// store readers. Configurable via DBFORK_JAVA_HEAP env var.
147147
javaHeapFlag(),
148148
"-jar", javaJar, "db", "fork",
149-
"-d", filepath.Join(scratchJava, "database"),
149+
// -d is the output-directory (the PARENT of database/), NOT the
150+
// database/ dir itself: java DbFork's DbTool.getDB appends
151+
// `database/<store>` internally (DbFork.java:120 -> DbTool). The
152+
// Go side mirrors this — Apply(scratchGo) opens
153+
// scratchGo/database/<store>. Passing scratchJava/database here
154+
// made java look in scratchJava/database/database/<store> and
155+
// fail to open the LOCK. (Latent until the gate stopped
156+
// vacuously skipping — the java path was never exercised.)
157+
"-d", scratchJava,
150158
"-c", forkConfPath,
151159
}
152160
if len(cfg.Witnesses) == 0 {

0 commit comments

Comments
 (0)