exasol / integration-test-docker-environment

A docker-based environment for integration tests with the EXASOL DB.
https://exasol.github.io/integration-test-docker-environment/
MIT License
6 stars 2 forks source link

"Arbitrary" test failures after previous test run have been aborted #181

Closed Nicoretti closed 2 years ago

Nicoretti commented 2 years ago

Attention:

Steps to reproduce:

  1. Start all tests via scripts/test/run_all_tests.sh
  2. Wait until at least 1-2 docker processes are spawned/running + DB container (docker ps)
  3. Stop/Interrupt the test execution using STRG + C (SIGINT)
  4. As of now, it looks like when the DB docker container is left behind, one will get some sort of errors in successive test executions until the "containers" are cleaned up.
  5. Execute all test (some tests should fail until the containers are cleaned up)
    • docker rm <hash> ...
    • docker image prune

Root Cause: As of now, it looks like the left behind Exasol DB container causes test failures in successive test executions.

Possible strategies to address this bug:

Potentially related issues:

tkilias commented 2 years ago

@Nicoretti We actually have cleanup code in place on multiple levels which reacts to SIGINT. The tasks which are starting the DB, remove it when one of them fail and the Test abstraction cleans up as well and the teardowns, too. Can you confirm it was a single CTRL+C, because I so far only saw leftovers after a double CTRL+C which is more or less a SIGKILL. This can also happen easily, because the cleanup takes a while.

Nicoretti commented 2 years ago

@tkilias I am quite confident I pressed it at least twice. So I don't think it is a bug in this case. Still I don't think pressing 2x ctrl + c ending up being a "SIGKILL" is obvious to an end user. We may should add a warning regarding this.

Nicoretti commented 2 years ago

@tkilias just validated it, 1x ctrl + c works well but 2x ctrl + c may leave leftovers behind. So I would say it isn't a bug.

Current Implementation:

To sum it up: It works as expected, but the implication(s) of the Aborted! could be made more clear.

tkilias commented 1 year ago

@tkilias just validated it, 1x ctrl + c works well but 2x ctrl + c may leave leftovers behind. So I would say it isn't a bug.

Current Implementation:

* On the first `ctrl + c` the end user gets informed that the "program" is shutting down

* On the second `ctrl + c` the end user gets the message `Aborted!`

To sum it up: It works as expected, but the implication(s) of the Aborted! could be made more clear.

@Nicoretti Hm, interesting, I am actually not sure, where the message Aborted! comes from.