Skip to content

Pure-Java conformance tests - #941

Merged
snazy merged 1 commit into
projectnessie:mainfrom
snazy:conf-no-grpc
Jul 27, 2026
Merged

Pure-Java conformance tests#941
snazy merged 1 commit into
projectnessie:mainfrom
snazy:conf-no-grpc

Conversation

@snazy

@snazy snazy commented Jul 24, 2026

Copy link
Copy Markdown
Member

The original Bazel-driven build in CEL-Java to run conformance-tests was leveraging the simple_test convenience binary to run tests. That binary no longer exists for CEL-Spec 0.25.2 and was replaced with a Java client in the CEL-Spec version bump PR.

This change goes further and removes the Bazel build entirely and replaces the client/server split, which was needed for the simple_test tool, with JUnit test-factory.

The original Bazel-driven build in CEL-Java to run conformance-tests was leveraging the `simple_test` convenience binary to run tests.
That binary no longer exists for CEL-Spec 0.25.2 and was replaced with a Java client in the CEL-Spec version bump PR.

This change goes further and removes the Bazel build entirely and replaces the client/server split, which was needed for the `simple_test` tool, with JUnit test-factory.
@snazy
snazy requested a review from XN137 July 24, 2026 16:50

@XN137 XN137 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 assuming we dont want to support concurrent execution

"wrappers/timestamp/to_json",
"wrappers/empty/to_json");

private static final Set<String> matchedSkips = new LinkedHashSet<>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sonnet finding:

AtomicInteger is used correctly for the counters, but matchedSkips is an unsynchronized LinkedHashSet. JUnit 5 @testfactory tests inside a DynamicContainer can execute concurrently under @execution(CONCURRENT). Even without that
annotation, test engines may parallelize by default in some configurations. Concurrent add() calls on a LinkedHashSet produce undefined behavior. Should be:

private static final Set matchedSkips = Collections.synchronizedSet(new LinkedHashSet<>());

or just a ConcurrentHashMap.newKeySet() (which sacrifices insertion order but that's fine here since it's only used for membership tests).

Stream<DynamicNode> simpleConformance() {
List<DynamicNode> files = new ArrayList<>();
TEST_FILES.forEach(fileName -> files.add(dynamicContainer(fileName, fileTests(fileName))));
files.add(dynamicTest("skip list matches testdata", this::assertAllSkipsMatched));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sonnet finding:

This sentinel is appended to the file list and relies on JUnit executing it after all dynamic tests have populated matchedSkips. JUnit does not guarantee ordering of dynamic nodes under concurrent execution. If anything parallel is ever
enabled this will produce false positives. A safer approach would be to collect matchedSkips from the SkipList.parse() result and do the check structurally (compare SKIP_TESTS against the parsed testdata at startup rather than tracking
hits at runtime).

@AfterAll
static void printSummary() {
System.out.printf(
"Conformance tests: %d total, %d passed, %d skipped%n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume we confirmed we pass and skip the same amount as previously

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - it'll be eventually be even more

Comment thread conformance/README.md

Optional CEL-Spec files such as extension libraries, optionals, and type
deduction are intentionally not enabled by default. Add those separately with
explicit skip reasoning.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the last sentence a TODO ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, scope to follow-up work.

@snazy
snazy merged commit c01ac6b into projectnessie:main Jul 27, 2026
3 checks passed
@snazy
snazy deleted the conf-no-grpc branch July 27, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants