Skip to content

Commit 8242064

Browse files
committed
Merge remote-tracking branch 'upstream/master' into ad_project_path_analytics
2 parents 698cc46 + 86831c2 commit 8242064

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/xraybinmgr_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ func addBuildsToIndexing(t *testing.T) {
4343
return false
4444
}
4545
return slices.Contains(indexedBuilds, buildName)
46-
}, time.Second*5, time.Millisecond*150, "Build %s not found in indexed builds", buildName)
46+
}, time.Second*30, time.Millisecond*500, "Build %s not found in indexed builds", buildName)
4747
}

xray/services/buildscan.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ func (bs *BuildScanService) getBuildScanResults(reqFunc func() (*http.Response,
174174
if err != nil {
175175
return nil, err
176176
}
177+
if len(body) == 0 {
178+
return nil, errorutils.CheckErrorf(
179+
"Received empty response from Xray server (HTTP 200). " +
180+
"This may indicate a server-side timeout during authentication. Please retry.",
181+
)
182+
}
177183
buildScanResponse := BuildScanResponse{}
178184
if err = json.Unmarshal(body, &buildScanResponse); err != nil {
179185
return nil, errorutils.CheckError(err)

0 commit comments

Comments
 (0)