test(java-oracle): DnsRun records DNS as Java FILIUS runs it

A resolver's lookup on the new dns-lan network (A, MX, a referral by NS,
an unknown name, a missing server): every frame and the call's result.
ScenarioNetwork installs a scenario's DNS servers. The Swift comparison
reads only scenarios with a Swift result.

Measured: Java's text messages (ID=... QR=... header, question and record
lines), no question in the answer, RCODE 0 always, a referral in the answer
section, an iterative resolver waiting 5 RTT per query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 16:46:07 +00:00
co-authored by Claude Opus 5.5
parent efc7c440f6
commit 24ebcea67f
11 changed files with 914 additions and 3 deletions
+3 -2
View File
@@ -3,7 +3,7 @@
// same file (<name>.swift.json, written by tools/swift-oracle/run.sh).
// Every trace event must match: identity, time, node, headers, detail.
import { readdirSync, readFileSync } from 'node:fs';
import { existsSync, readdirSync, readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
@@ -272,8 +272,9 @@ function run(scenario: Scenario): Record<string, unknown> {
};
}
// Scenarios with a Swift result (the Java comparisons have scenarios of their own).
const scenarioNames = readdirSync(scenarioDirectory)
.filter((name) => name.endsWith('.scenario.json'))
.filter((name) => name.endsWith('.scenario.json') && existsSync(join(scenarioDirectory, name.replace('.scenario.json', '.swift.json'))))
.map((name) => name.replace('.scenario.json', ''))
.sort();