Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed #33

Merged
merged 3 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions server/src/util/add-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ export async function addTest(request) {
},
{
jobId,
removeOnComplete: 3600,
removeOnFail: 3600,
removeOnComplete: 200,
removeOnFail: 400,
priority
}
);
Expand Down Expand Up @@ -199,8 +199,8 @@ export async function addTestFromAPI(

const jobConfig = {
jobId,
removeOnComplete: 3600,
removeOnFail: 3600,
removeOnComplete: 200,
removeOnFail: 400,
priority: priority || 10
};

Expand Down
18 changes: 12 additions & 6 deletions testrunner/src/testrunners/docker-testrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,18 @@ export default async function runJob(job) {
runTime = testResult.result.browsertime[0].info.timestamp;
}

resultQueue.add({
result: testResult.result,
id: job.id,
status: testResult.exitCode === 0 ? 'completed' : 'failed',
runTime
});
resultQueue.add(
{
result: testResult.result,
id: job.id,
status: testResult.exitCode === 0 ? 'completed' : 'failed',
runTime
},
{
removeOnComplete: 200,
removeOnFail: 200
}
);

if (testResult.exitCode > 0) {
throw new Error(
Expand Down
18 changes: 12 additions & 6 deletions testrunner/src/testrunners/testrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ export default async function runJob(job) {
// The timestamp from Browsertime is more exact
runTime = testResult.result.browsertime[0].info.timestamp;
}
resultQueue.add({
result: testResult.result,
id: job.id,
status: testResult.exitCode === 0 ? 'completed' : 'failed',
runTime
});
resultQueue.add(
{
result: testResult.result,
id: job.id,
status: testResult.exitCode === 0 ? 'completed' : 'failed',
runTime
},
{
removeOnComplete: 200,
removeOnFail: 200
}
);
if (testResult.exitCode > 0) {
throw new Error(
`sitespeed.io exited with a failure exit code ${testResult.exitCode}`
Expand Down