Is there a way to extend the time for a Selenium Docker container to finish in GitLab?

9 views
Skip to first unread message

Alexandre Mariano

unread,
May 31, 2023, 5:06:08 PMMay 31
to Selenium Users
To replicate this scenario on your own local machine, use this tutorial: https://github.com/alexandremariano4/template-gitlab-test/blob/main/README.md

I'm using the following repository on GitLab (which you can copy and test on your machine) to run the tests: https://github.com/alexandremariano4/template-gitlab-test

I need to be able to increase the time that the container is finished inside the pipeline, in my current context, I have the following gitlab-ci.yml file

Here is a gitlab-ci.yml file: https://gist.github.com/alexandremariano4/ae1789074046e7f386a99b15090cff8e

The only thing that my code "teste.py" does is enter google and print the page title name, just using it for tests. Although my scenario is working correctly, and in fact this pipeline is recording the video as it should in the "videos" folder, the selenium/video container is ending abruptly, not giving time for the functionality to create the complete file to have success.

As you can see inside this docker-compose.yml container, when I use the "docker compose down" command, the container executes some process: Image of process running in docker-compose


Image of the container running on gitlab at the moment it is finalizing 

These two images, I took at the exact moment when, respectively, I used the "docker compose down" command and the moment when the container is starting to be closed in gitlab

I tried to change time-out parameters inside the runner using the shutdown_timeout parameter, but it didn't work, I saw something related to SIGTERM and SIGKILL, which seems to be something related to the time it takes for the container to be canceled, however, I don't I couldn't see any way to change this, or apply what I saw on the gitlab forums to my context.

I need to be able to postpone closing the selenium/video container, so that it can do all the steps that are performed by the ffmpeg library, video compression, etc (I don't know exactly what it does). So the evidence that is generated is not a broken mp4 file.

Gitlab artifact image with broken mp4 file

Reply all
Reply to author
Forward
0 new messages