Skip to content

THRIFT-6506: Run lib/java test classes named *Test - #4145

Open
slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:THRIFT-6506
Open

slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:THRIFT-6506

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Jira: THRIFT-6506

The lib/java Gradle test task only included Test* classes, so seven *Test classes in org.apache.thrift.partial (36 tests) never ran. The include, and Clover's testIncludes, now match *Test too, with matching inner-class excludes; JUnit skips the abstract *TestBase classes. One assertion in ThriftMetadataTest expected a root ==> name toString format the library has never produced, so it is dropped.

Verified: gradle test → 401 executed tests on master, 437 on this branch, 0 failures.

  • Did you create an Apache Jira ticket?
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-6506: describe my issue"?
  • Did you squash your changes to a single commit?
  • Did you do your best to avoid breaking changes? Test configuration only.

@mergeable mergeable Bot added the java Pull requests that update Java code label Nov 8, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 8, 2026 02:07
Copilot AI balanced review requested due to automatic review settings November 8, 2026 02:07

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Jens-G

Jens-G commented Nov 13, 2026

Copy link
Copy Markdown
Member

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

One suggestion, below the bar for an issue. This PR makes ValidateTest.testCheckPathExists run for the first time. On Windows, its Paths.get("<not-found>") throws InvalidPathException, because < and > are not allowed in a Windows path, and that happens before any assertion runs. No CI job builds lib/java on Windows, so nothing would show it, but lib/java/README.md describes building on a Windows box. A name without reserved characters, for example a child of tempDir that does not exist, would avoid it. This follows from the JDK's Windows path rules; I did not run it on Windows.

@Test
public void testCheckPathExists() throws IOException {
Path tempFile = Files.createTempFile("foo", "bar");
Path tempDir = tempFile.getParent();
Path notFound = Paths.get("<not-found>");

🤖 Generated with Claude Code

Client: java

The test task only included Test*, so seven classes in
org.apache.thrift.partial (36 tests) never ran. Widen the include, and the
Clover testIncludes, to *Test with matching inner-class excludes; JUnit
skips the abstract *TestBase classes. ThriftMetadataTest asserted a
"root ==> name" toString format the library has never produced, so that
assertion is dropped. gradle test: 401 -> 437 executed tests, 0 failures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 17:26

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants