Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running tests for test_javacore_analyzer.TestJavacoreAnalyzer.test_api results in ResourceWarnings #29

Open
PiotrAniola82 opened this issue Nov 12, 2024 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@PiotrAniola82
Copy link
Collaborator

Run python tests for the web app
Result:
Running tests results in these warnings:
C:\Users\P40095820\AppData\Local\Programs\Python\Python39\lib\tempfile.py:817: ResourceWarning: Implicitly cleaning up <TemporaryDirectory 'C:\Users\P400951\AppData\Local\Temp\tmp1suy1o6f'>
_warnings.warn(warn_message, ResourceWarning)
Error during processing file: C:\Users\P400951\AppData\Local\Temp\tmp8bpqpazp\javacore.20220606.114458.32888.0000.txt
line number: 63
line:
Check the exception below what happened
C:\Users\P40095820\AppData\Local\Programs\Python\Python39\lib\tempfile.py:817: ResourceWarning: Implicitly cleaning up <TemporaryDirectory 'C:\Users\P40095~1\AppData\Local\Temp\tmpfz2s89a2'>
_warnings.warn(warn_message, ResourceWarning)

@kkazmierczyk
Copy link
Collaborator

@PiotrAniola82 I am not sure what you mean by tests for web app. We do not have any explicit tests. Can you share steps to reproduce?

@PiotrAniola82
Copy link
Collaborator Author

Just our normal automated tests.
When I execute "Python tests in test" on a branch that includes the web app, I get these ResourceWarnings

@kkazmierczyk
Copy link
Collaborator

OK. This is for test test_javacore_analyzer.TestJavacoreAnalyzer.test_api

@kkazmierczyk kkazmierczyk changed the title running tests for web application results in ResourceWarnings running tests for test_javacore_analyzer.TestJavacoreAnalyzer.test_api results in ResourceWarnings Nov 12, 2024
@kkazmierczyk kkazmierczyk added the good first issue Good for newcomers label Nov 12, 2024
@kkazmierczyk
Copy link
Collaborator

The issue is caused by the fact, that we do not clean up temp files inside api methods.
The error is harmless from usage perspective.

In order to do that correctly, we should have any finalize method for finalize in JavacoreAnalyser.

Setting this as a minor issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants