← 输入框|github.com|刷新
Skip to content

Fix: Directory in feldera-qa for QATests.java - #7853

Merged
mihaibudiu merged 1 commit into
mainfrom
fix-directory-in-feldera-qa
Nov 5, 2026
Merged

mihaibudiu merged 1 commit into
mainfrom
fix-directory-in-feldera-qa

Conversation

@tbfel

@tbfel tbfel commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

To be merged after https://github.com/feldera/feldera-qa/pull/472 is merged.

List<File> result = new ArrayList<>();
String dir = "../../../feldera-qa";
String[] subdirs = new String[] { "new/workloads", "." };
String[] subdirs = new String[] { "workloads" };

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.

pitfall (medium): If this path is wrong, nothing fails. When workloads/ is missing, getQATests() returns an empty list and qaTests passes in ~50 ms having compiled 0 files (I checked this locally). That is presumably how the old new/workloads path went stale without anyone noticing. Suggest making the test fail loudly, or at least report itself as skipped, when it finds no SQL files. For example, in qaTests():

List<File> tests = getQATests();
org.junit.Assume.assumeFalse("no QA workloads found under ../../../feldera-qa/workloads", tests.isEmpty());

Assume reports a skip instead of a silent pass. Use Assert.assertFalse if a missing directory should count as a failure.

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

LGTM. This is a one-line, test-only path fix. It doesn't change product behaviour, and none of the PR-check gates apply (deps, unsafe code, docs, connectors, CI).

What I ran (./build.sh, then mvn test -pl SQL-compiler -Dtest=QATests, against a fake sibling QA checkout):

Scenario Result
workloads/demo/program.sql with a '{input_connectors}' placeholder ✅ found and compiled, test passes
also add workloads/bad/program.sql with an unknown column ✅ test fails, as expected
no QA checkout at all ⚠️ passes after compiling 0 files (see inline comment)

Pitfall (medium): No CI workflow runs QATests, and it passes without doing anything when the directory is missing. A future layout change will break it silently again. The inline comment has a one-line guard. Note also that dropping "." stops the test from scanning other top-level directories of the QA checkout. If any SQL still lives outside workloads/, it will no longer be covered.

@mihaibudiu
mihaibudiu added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit e45e7c8 Nov 5, 2026
3 checks passed
@mihaibudiu
mihaibudiu deleted the fix-directory-in-feldera-qa branch November 5, 2026 18:08
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