mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-01-30 21:09:07 +08:00
pr feedback - test should fail on evictions
This commit is contained in:
@@ -53,6 +53,18 @@ describe('Cloud Runner Kubernetes', () => {
|
||||
const incompleteLogsMessage =
|
||||
'Pod logs incomplete - "Collected Logs" marker not found. Pod may have been terminated before post-build completed.';
|
||||
|
||||
// Check if pod was evicted due to resource constraints - this is a test infrastructure failure
|
||||
// Evictions indicate the cluster doesn't have enough resources, which is a test environment issue
|
||||
if (results.includes('The node was low on resource: ephemeral-storage') ||
|
||||
results.includes('TerminationByKubelet') ||
|
||||
results.includes('Evicted')) {
|
||||
throw new Error(
|
||||
`Test failed: Pod was evicted due to resource constraints (ephemeral-storage). ` +
|
||||
`This indicates the test environment doesn't have enough disk space. ` +
|
||||
`Results: ${results.substring(0, 500)}`
|
||||
);
|
||||
}
|
||||
|
||||
// If we hit the aggressive fallback path and couldn't retrieve any logs from the pod,
|
||||
// don't assert on specific Unity log contents – just assert that we got the fallback message.
|
||||
// This makes the test resilient to cluster-level evictions / PreStop hook failures while still
|
||||
|
||||
Reference in New Issue
Block a user