• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Intermittent test case failure

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic