Skip to content

Conversation

@CosmosNi
Copy link
Contributor

fix the problem of not releasing file resources, which leads to slow subsequent file parsing

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

… which leads to slow subsequent file parsing
@Hisoka-X Hisoka-X changed the title [fix][ci-tool] fix the problem of not releasing file resources, which leads to slow subsequent file parsing [Fix][CI] Fix the problem of not releasing file resources, which leads to slow subsequent file parsing Apr 25, 2025
@nielifeng nielifeng requested a review from Copilot April 25, 2025 09:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request addresses the file resource leakage issue by adding cleanup methods to reset static state in test classes, thus ensuring that subsequent file parsing is not adversely affected by residual test state.

  • Introduced an @afterall cleanup method in SerialVersionUIDCheckerTest.java to clear static collections.
  • Introduced an @afterall cleanup method in ImportClassCheckTest.java to clear the importsMap.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/SerialVersionUIDCheckerTest.java Added a cleanup method to reset static collections and avoid resource retention between tests.
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ImportClassCheckTest.java Added a cleanup method to reset the importsMap to ensure a clean state for testing.

@CosmosNi
Copy link
Contributor Author

@hailin0 hailin0 changed the title [Fix][CI] Fix the problem of not releasing file resources, which leads to slow subsequent file parsing [Fix][CI] Release file resources in testcase Apr 25, 2025
@hailin0 hailin0 merged commit 0ed8885 into apache:dev Apr 25, 2025
6 checks passed
jia17 pushed a commit to jia17/seatunnel that referenced this pull request Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants