apache / incubator-kie-kogito-images

Images for Kogito
http://kogito.kie.org
Apache License 2.0
23 stars 80 forks source link

Increase Cekit Behave tests timeout #1725

Open ricardozanini opened 11 months ago

ricardozanini commented 11 months ago

We have a few tests that need more time to spin up the container in our current environment. They are failing simply because the default timeout is reached:

Failing step: And container log should contain Embedded Postgres started at port ... failed in 30.404s
Location: features/image/data-index/kogito-data-index-ephemeral.feature:17
Traceback (most recent call last):
  File "/home/nonrootuser/.local/lib/python3.11/site-packages/behave/model.py", line 1329, in run
    match.run(runner.context)
  File "/home/nonrootuser/.local/lib/python3.11/site-packages/behave/matchers.py", line 98, in run
    self.func(context, *args, **kwargs)
  File "steps/container_steps.py", line 34, in log_contains_msg
    raise Exception("Message '%s' was not found in the logs" % message)
Exception: Message 'Embedded Postgres started at port' was not found in the logs

Captured logging:
INFO:cekit:Message '-Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar' was found in the logs

In this example, the runtime is taking more time to reach the given log. This timeout is fixed in their code:

https://github.com/cekit/behave-test-steps/blob/v1/steps/steps.py#L15

We should be able to set the env BEHAVE_TIMEOUT in the pipeline.