Query Bamboo for 10,000 test results = Connection reset by peer: socket write error or URI too long

When I execute the following I either receive URI-Too-Long when accessible bamboo via apache or "java.net.SocketException: Connection reset by peer: socket write error" when accessing bamboo directly

result/BAMSYT-BRGIT-JOB1-latest?expand=testResults.allTests

 

Can I get a list of IDs from REST which I can use to iterate and access individual results ?

My goal is to track success and failures across partial builds. I need to know last-known-pass and first-known-fail. Because I have 10,000 unit tests the query is long.

Is it possible for me to do this via the REST interface on bamboo 4.4.2 or must I package the details in a file and store that as an artifact?

def restClient = new RESTClient(myBambooURL)
def query = 'result/BAMSYT-BRGIT-JOB1-latest?expand=testResults.allTests'

// Added This to set a long wait, but I'm not sure it is working
def headers = ['http.connection.timeout': 300000, 'http.socket.timeout': 300000]
restClient.setHeaders(headers)

def response = restClient.get(path : path , contentType: 'TEXT' ,
      headers : [Accept: 'application/json'], query : [ (splitQuery[0]):(splitQuery[1]), "max-results" : "100" ] )

return JsonParser(response.data.text)

 

Let me know if you have any ideas.

 

Thanks

 

Peter

1 answer

I'm pretty sure the answer is = don't access the data via this channel and parse the surefire reports directly.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,064 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot