Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


bitbucket pipeline IndexOutOfBounds Index: 0, Size: 0 error


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)?

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 30, 2023

Hi @Meagan Hiatt,

Thank you for reaching out to the community.

It seems to me that you'd need to put in some buffer time so that it will not move on too quickly.
Have you tried putting some sleep command there?

Mark C

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events