question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoSuchElementException in getCurrentStep() method during parallel run

See original GitHub issue

I’m submitting a …

  • [* ] bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

During parallel run about 50-70 threads using testNg mechanism i faced that sometimes method which annotated with @Step threw NoSuchElementException

java.util.NoSuchElementException at java.util.LinkedList.getFirst(LinkedList.java:244) at io.qameta.allure.internal.AllureStorage.getCurrentStep(AllureStorage.java:37) at io.qameta.allure.AllureLifecycle.startStep(AllureLifecycle.java:203) at io.qameta.allure.aspects.StepsAspects.step(StepsAspects.java:49)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Allure threw NoSuchElementException in public Optional<String> getCurrentStep() { final LinkedList<String> uids = currentStepContext.get(); return uids.isEmpty() ? Optional.empty() : Optional.of(uids.getFirst());

so i think this method should be synchronized

What is the expected behavior?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Allure version 2.4.1
Test framework testng@6.9.10
Allure adaptor allure-testng@2.6.0
Generate report using allure-gradle@2.5

Other information

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bwolfecommented, May 17, 2018

This ticket should be in the allure-java repo

0reactions
baevcommented, Nov 26, 2018

The issue should be fixed in latest allure-java release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Am I Getting a NoSuchElementException When Running ...
This error message... org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"class name" ...
Read more >
How to Fix the No Such Element Exception in Java - Rollbar
The NoSuchElementException in Java can be thrown by various accessor methods to indicate that the element being requested does not exist.
Read more >
org.openqa.selenium.NoSuchElementException when I run ...
A very common method used for the wait is as follows. ... I'm getting an Exception as below ,when i run the selenium...
Read more >
Index - R3 Documentation
An abstract class defining fields shared by all transaction types in the system. BaseTransaction() - Constructor for class net.corda.core.transactions.
Read more >
25471 (Random test failures with parallel selenium tests)
When running selenium tests in parallel I often get test failures that seem to be some kind ... NoSuchElementException: Message: Unable to locate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found