Skip to content

Commit 2b37f9c

Browse files
authored
Merge pull request #521 from avinxshKD/fix/java-conformance-ci-phase2
ci: add java phase-2 conformance coverage
2 parents 393eabc + 6e59e9d commit 2b37f9c

File tree

4 files changed

+75
-2
lines changed

4 files changed

+75
-2
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,29 @@ jobs:
5555
--ignore=ratc/ \
5656
--ignore=linktest/
5757
58+
java-test:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- uses: actions/setup-java@v4
64+
with:
65+
distribution: 'temurin'
66+
java-version: '17'
67+
68+
- name: Download jeromq
69+
run: |
70+
curl -fsSL -o jeromq.jar https://repo1.maven.org/maven2/org/zeromq/jeromq/0.6.0/jeromq-0.6.0.jar
71+
72+
- name: Compile Java tests
73+
run: |
74+
javac -cp jeromq.jar concoredocker.java TestLiteralEval.java TestConcoredockerApi.java
75+
76+
- name: Run Java tests
77+
run: |
78+
java -cp .:jeromq.jar TestLiteralEval
79+
java -cp .:jeromq.jar TestConcoredockerApi
80+
5881
docker-build:
5982
runs-on: ubuntu-latest
6083
steps:

tests/protocol_fixtures/PROTOCOL_FIXTURES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@ Phase-2 scope (mapping only):
1616

1717
- No runtime behavior changes.
1818
- Adds a cross-runtime matrix to track per-case audit status and classification.
19-
- Keeps CI non-blocking for non-Python runtimes by marking them as `not_audited` until adapters are added.
19+
- Java runtime entries are tracked with observed status from the Java regression suite (`TestLiteralEval.java`, `TestConcoredockerApi.java`).
20+
- Current baseline records Java as `observed_pass` for the listed phase-2 cases.
21+
- Keeps CI non-blocking for non-Python runtimes that are not yet audited by marking them as `not_audited`.
22+
23+
Java conformance execution in CI:
24+
25+
- The `java-test` job in `.github/workflows/ci.yml` downloads `jeromq` for classpath compatibility.
26+
- It compiles `concoredocker.java`, `TestLiteralEval.java`, and `TestConcoredockerApi.java`.
27+
- It runs both Java test classes and records initial phase-2 matrix status as observed in CI.

tests/protocol_fixtures/cross_runtime_matrix.phase2.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"runtimes": [
77
"python",
88
"cpp",
9+
"java",
910
"matlab",
1011
"octave",
1112
"verilog"
@@ -35,6 +36,11 @@
3536
"classification": "required",
3637
"note": "Audit planned in phase 2."
3738
},
39+
"java": {
40+
"status": "observed_pass",
41+
"classification": "required",
42+
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
43+
},
3844
"matlab": {
3945
"status": "not_audited",
4046
"classification": "required",
@@ -66,6 +72,11 @@
6672
"classification": "required",
6773
"note": "Audit planned in phase 2."
6874
},
75+
"java": {
76+
"status": "observed_pass",
77+
"classification": "required",
78+
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
79+
},
6980
"matlab": {
7081
"status": "not_audited",
7182
"classification": "required",
@@ -97,6 +108,11 @@
97108
"classification": "required",
98109
"note": "Audit planned in phase 2."
99110
},
111+
"java": {
112+
"status": "observed_pass",
113+
"classification": "required",
114+
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
115+
},
100116
"matlab": {
101117
"status": "not_audited",
102118
"classification": "required",
@@ -128,6 +144,11 @@
128144
"classification": "required",
129145
"note": "Audit planned in phase 2."
130146
},
147+
"java": {
148+
"status": "observed_pass",
149+
"classification": "required",
150+
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
151+
},
131152
"matlab": {
132153
"status": "not_audited",
133154
"classification": "required",
@@ -159,6 +180,11 @@
159180
"classification": "required",
160181
"note": "Audit planned in phase 2."
161182
},
183+
"java": {
184+
"status": "observed_pass",
185+
"classification": "required",
186+
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
187+
},
162188
"matlab": {
163189
"status": "not_audited",
164190
"classification": "required",
@@ -190,6 +216,11 @@
190216
"classification": "required",
191217
"note": "Audit planned in phase 2."
192218
},
219+
"java": {
220+
"status": "observed_pass",
221+
"classification": "required",
222+
"note": "Validated by TestLiteralEval.java and TestConcoredockerApi.java."
223+
},
193224
"matlab": {
194225
"status": "not_audited",
195226
"classification": "required",

tests/test_protocol_conformance_phase2.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
PHASE1_CASES_PATH = FIXTURE_DIR / "python_phase1_cases.json"
77
PHASE2_MATRIX_PATH = FIXTURE_DIR / "cross_runtime_matrix.phase2.json"
88

9-
EXPECTED_RUNTIMES = {"python", "cpp", "matlab", "octave", "verilog"}
9+
EXPECTED_RUNTIMES = {"python", "cpp", "java", "matlab", "octave", "verilog"}
1010
EXPECTED_CLASSIFICATIONS = {"required", "implementation_defined", "known_deviation"}
1111
EXPECTED_STATUSES = {"observed_pass", "observed_fail", "not_audited"}
1212

@@ -30,6 +30,8 @@ def test_phase2_matrix_metadata_and_enums():
3030
assert doc["phase"] == "2"
3131
assert doc["mode"] == "report_only"
3232
assert doc["source_fixture"] == "python_phase1_cases.json"
33+
assert "java" in doc["runtimes"]
34+
assert len(doc["runtimes"]) == len(set(doc["runtimes"]))
3335
assert set(doc["runtimes"]) == EXPECTED_RUNTIMES
3436
assert set(doc["classifications"]) == EXPECTED_CLASSIFICATIONS
3537
assert set(doc["statuses"]) == EXPECTED_STATUSES
@@ -55,3 +57,12 @@ def test_phase2_matrix_rows_have_consistent_shape():
5557
assert isinstance(result["note"], str) and result["note"].strip()
5658
if runtime == "python":
5759
assert result["status"] == "observed_pass"
60+
61+
62+
def test_phase2_matrix_java_status_is_recorded_for_each_case():
63+
for row in _phase2_matrix()["cases"]:
64+
java_result = row["runtime_results"]["java"]
65+
assert java_result["status"] in EXPECTED_STATUSES
66+
assert java_result["classification"] in EXPECTED_CLASSIFICATIONS
67+
assert isinstance(java_result["note"], str) and java_result["note"].strip()
68+
assert java_result["status"] == "observed_pass"

0 commit comments

Comments
 (0)