In our pipeline we run our Java unit tests.
During some of the unit tests:
- we request something from the db or a third party and it fills the array.
- we know these requests are successful (the third party tool shows received and sent request, so I have confirmed its requesting the information and it's sent back).
But it seems like bitbucket tries to move on too quickly before the variable is actually set and it throws this error. But only sometimes. I re-run the pipeline and it's fine. But 1/5 times it fails with this error.
What are ways to fix this? Caching? Sleeps? Have it auto re-run once if it fails (I'd rather not since this seems like a hack)?