-
Notifications
You must be signed in to change notification settings - Fork 298
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
Programming exercises
: Delete directory for import from file if error occurs
#6864
Programming exercises
: Delete directory for import from file if error occurs
#6864
Conversation
Development
: Delete directory for import from file if error occursProgramming exercises
: Delete directory for import from file if error occurs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code should fix the issue. Insurgent simply putting the deletion right after getting the folder instead of putting it into a finally block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. There's a star import that you could replace, but it's non-blocking.
.../artemis/exercise/programmingexercise/ProgrammingExerciseBitbucketBambooIntegrationTest.java
Outdated
Show resolved
Hide resolved
aa17cb6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only changed imports. Still look good to me
Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
Currently, when importing a programming exercise from file, the directory is only scheduled for the deletion if the import is successful.
We, however, want to delete it regardless if the import fails or not.
Description
Wrap the import process in a try block and the directory deletion scheduling in a finally block, so it's always executed.
Since this is hard to test on a test server without access to the file system, I added server tests, to ensure the deletion method is invoked.
Steps for Testing
Code review only.
Review Progress
Performance Review
Code Review
Test Coverage
Server