Skip to content

Commit 79b62de

Browse files
author
Mark Pollack
committed
Raw conformance: raw.stdio.eof-answers gates conf-java-agent-stdio
The Java stdio agent answers every request received before stdin's EOF (e4b3630), so the case is no longer timing-dependent against it: 52 of 52 runs passed, 20 in sequence and 32 eight at a time. It leaves EVIDENCE_ONLY and joins the generated scenario.
1 parent dacdd39 commit 79b62de

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎integration-testing/configs/conf-java-agent-stdio.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "conf-java-agent-stdio",
3-
"description": "raw client -> java agent over stdio: 32 raw JSON-RPC cases (generated)",
4-
"timeoutSec": 400,
3+
"description": "raw client -> java agent over stdio: 33 raw JSON-RPC cases (generated)",
4+
"timeoutSec": 405,
55
"peers": [],
66
"processes": [
77
{
@@ -14,12 +14,12 @@
1414
"env": {
1515
"AGENT_CMD": "${ROOT}/programs/java/launch/agent.sh --transport stdio"
1616
},
17-
"timeoutSec": 280
17+
"timeoutSec": 285
1818
}
1919
],
2020
"assertions": {
2121
"checks": [
22-
"client RESULT pass == 32",
22+
"client RESULT pass == 33",
2323
"client RESULT fail == 0"
2424
],
2525
"expectedFailures": [],

‎integration-testing/programs/raw/raw.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,9 @@ def c_parse_error_large(p):
10591059
def c_eof_answers(p):
10601060
"""Requests written just before stdin closes are still answered before the agent exits.
10611061
No spec text requires it; an agent that exits at EOF with answers unwritten loses replies a
1062-
client that pipes requests and closes stdin (`printf ... | agent`) waits for. Racy by
1063-
nature, so evidence only (EVIDENCE_ONLY), never a gate."""
1062+
client that pipes requests and closes stdin (`printf ... | agent`) waits for. The Java agent
1063+
answers them since its stdio transport treats EOF as a half-close, so this gates
1064+
conf-java-agent-stdio; against a peer (--target) it stays evidence."""
10641065
proc = subprocess.Popen(["bash", "-c", "exec " + os.environ["AGENT_CMD"]], stdin=subprocess.PIPE,
10651066
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
10661067
frames = [dumps({"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": CLIENT_INIT})]
@@ -1191,7 +1192,7 @@ def nf(method, params_fn=lambda p: {}):
11911192
]
11921193
# Cases whose outcome is timing-dependent: run with --target (evidence) or --cases, never in the
11931194
# generated scenarios.
1194-
EVIDENCE_ONLY = {"raw.stdio.eof-answers"}
1195+
EVIDENCE_ONLY = set()
11951196

11961197

11971198
def client_case_ids(transport, evidence=False):

0 commit comments

Comments
 (0)