Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Intermittent test case failure

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Forum members,

I am facing some issues while building the code because of one test failure. This is happening intermittently, occurs once when I build the code approx 20 times. The error I am getting at console is:


[color=green]

-------------------------------------------------------------------------------------------------------------------------------

When i looked into surefire report, i got the following info there-




I tried to get any solution on Google and dig a lot but no success. Please put some light on the issues, I'll really great full for your help.

Regards,
Anurag


 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you asserting at BusinessServiceTest.testValidUpdateRequestForlNameSaveOrUpdate(BusinessServiceTest.java:3278) and how are you running the tests?
 
Anuragk kushwaha
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Armitage,

Thanks for your quick response.

Asertion-



Errors comming when i am building my project using-
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to find out more information about the failure using ex.printStacktrace() at that line.
 
Anuragk kushwaha
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Armitage,

Tried to run multiple time but didn't got any failure again. Allready applied your suggestion and will post once i'll see any problems.

Regards,
Anurag
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the try block for that catch is not too long (or has a low computational complexity) then you could try to deduce the reason why the test fails by identifying all lines that could throw the AccountManagerException in that try block. Then it's a matter of figuring out which of those lines could be dependent on some resource that could change between different invocations of the test case.
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic