allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

allure-awaitility: the steps in the allure-report break after calling the await() function

Open petrschitow opened this issue 2 years ago • 4 comments

Brief description of the problem:

I started using the allure-awaitility library and saw strange behavior - after the first call to the await() function in the test, either the hierarchy of steps in the report breaks or there are no steps at all after the step that contains await()

Steps to reproduce:

I created a simple project to demonstrate the problem (Kotlin + TestNG): https://github.com/petrschitow/allure-awaitility-issue

To reproduce the error, you need to run the tests and generate an allure-report using the following commands: mvn clean test allure serve target/allure-results

To observe different behavior, run tests with commented/uncommented lines 32-34 in TestConfiguration.kt file

You can find screenshots with actual/expected behaviour here

P.S. The pet-api is unstable, so you may need to run the test a couple of times.

petrschitow avatar Feb 28 '23 09:02 petrschitow

This is a major issue, awaitility is a very popular library

vicusbass avatar Aug 14 '23 05:08 vicusbass

Seems to be caused by awaitility polling with a different thread. Using await().pollInSameThread() fixes the issue for me.

pme-sap avatar Sep 25 '23 16:09 pme-sap

@pme-sap Yeah, seems to do the trick. It does go somehow against what's awaitility supposed to do though, a proper fix would be great

vicusbass avatar Sep 27 '23 11:09 vicusbass

Hi! Are there any updates on this? It's still reproducible in 2.27.0. Looks quite serious.

ilsilk avatar Apr 23 '24 12:04 ilsilk