-
Notifications
You must be signed in to change notification settings - Fork 187
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
The local appium process does not stop with SIGINT or SIGTERM #625
Comments
let me check tonight |
How did you stop the appium process, or did you keep the appium process running? I wondered how you managed appium process in your test running. |
Using Nunit in OnetimeSetup i do - [OneTimeSetUp] |
Thank you. Lets move to dotnet client repository to explore proper way |
@Dor-bl @laolubenson Do you know the best way to stop the local appium process with SIGINT or SIGTERM instead of SIGKILL in dotnet env? Below is the current implementation. In my research, the
|
Method Dispose also call Destroy and then Kill but no delete file, server it self stoped.
|
@VitaliiPivtorak can you share where are those files located? let me check if i can try and repro from my machine |
@KazuCocoa, Do you know if it's enough to start the service? Or I should also send newSession to the driver to create that file? |
The file will be generated when you start a new session request, so start an appium process + send a new session request to the appium |
Ok, so I have the way to repro this. but for now no luck after a couple of options I tried. |
Thanks. The worst case is... maybe send the signal, |
thing is that also on windows those files are not cleaned up |
I see... Then... not directly related for this SIGINT stuff in this ticket, but should https://github.com/appium/appium/blob/ff62e208d92995cabc35ddcc100ca4483e25b1af/packages/appium/lib/main.js#L439 have |
Do you think
I haven't checked what signal was sent on macOS, but for Win env, appium/appium#18901 and the |
What if server wasn't started from cmd, meaning no visible window? |
I see thanks. I thought it would not work but wanted to double check. |
I already tried 2 of the most popular solutions I found online. |
@Dor-bl Could you also please make sure the client does not add the The server only enables caching for POST and PATCH requests which have this header set to a non-empty string value. Check https://github.com/appium/appium/blob/master/packages/base-driver/lib/express/idempotency.js for more details |
Also for local testing you may create a simple node process containing https://nodejs.org/api/process.html#event-exit listener and then kill it using C#. If a "proper" kill method is used then the callback listener must be executed and the Example Node.js script payload: process.on('exit', () => {
console.log('all good!');
}); |
@mykola-mokhnach Indeed we are only adding the |
yes, it is. The Express framework always transforms all headers to lowercase. |
Small update:
I still need to figure out why when the node is running in the background I can't get the same result. |
@mykola-mokhnach / @KazuCocoa, can you have a look please at the provided repo? |
I am not a big expert there, but you could try the solution provided in https://stanislavs.org/stopping-command-line-applications-programatically-with-ctrl-c-events-from-net/ What's important:
So you probably should stick to the scenario 1:
|
Do I have the most recent component updates?
Is the component officially supported by the Appium team?
Is there an existing issue for this?
Current Behavior
During test run Appium generate huge amount of files *.response (like /private/var/folders/v6/fj6k1y_97yz990kh7rpjrvgm0000gp/T/8f1e5b3c-8bd6-44e6-8ddf-142f9e2537f3.response) and not deleted after. I have 240 tests which runs 3-5 times per day and on 3d day temp folder size more then 300GB.
Screen shot attached after run 3 time by 1 test.
Expected Behavior
After finish test run should be option to delete it.
Minimal Reproducible Example
Run test
Environment
appium --version
):2.0.0-rc.5node --version
):v18.15.0npm
version (output ofnpm --version
):9.6.3Link to Appium Logs
https://gist.github.com/VitaliiPivtorak/36690410feb338a012142b14f610023a
Futher Information
The text was updated successfully, but these errors were encountered: