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
Delete temporary created by Selendroid Server #862
Conversation
@@ -164,8 +164,12 @@ public void addToAppsStore(File file) throws AndroidSdkException { | |||
// using "android" as the app name, because that is the desired capability default in | |||
// selenium for | |||
// DesiredCapabilities.ANDROID | |||
File androidAPK = androidDriverAPKBuilder.extractAndroidDriverAPK(); | |||
if(serverConfiguration != null && serverConfiguration.isDeleteTmpFiles()) { | |||
androidAPK.deleteOnExit(); //Deletes temporary files if flag set |
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.
seems like something we should just have on by default? since the deleteOnExit seems pretty safe, since it'll wait for JVM to exit.
and we probably don't need a configuration flag around it then
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.
actualy, i take that back, the config should stay... but we should default it to true and let people disable this as the exception to the rule :)
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.
👍
also, can you please update your edits to the style format used in selendroid (2 spaces for tabs). And can you rebase your change? (as to not have the merge commits included?) |
@@ -140,6 +140,9 @@ | |||
@Parameter(names = "-folder", description = "The folder which contains Android applications under test. This folder will monitor and add new apps to the apps store during the lifetime of the selendroid node.") | |||
private String folder = null; | |||
|
|||
@Parameter(names = "-deleteTmpFiles", description = "Deletes temporary files created by the Selendroid Server.") | |||
private boolean deleteTmpFiles = false; |
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.
as per my other comments, can you change this to true :)
I updated my edits to the style format used in Selendroid and set -deleteTmpFiles to true by default |
Delete temporary created by Selendroid Server
whoops, @nadaismail can you please sign the cla? |
Added a command line flag, -deleteTmpFiles, to delete temporary files that persist in the temp directory. Files were being created after Selendroid Standalone Server was started and test app was run. When server is started with flag, then files will be deleted when server is stopped.