Skip to content

test(site): fix flaky outdated agent test #12927

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

Merged
merged 1 commit into from
Apr 10, 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
4 changes: 3 additions & 1 deletion site/e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export const createWorkspace = async (
await fillParameters(page, richParameters, buildParameters);
await page.getByTestId("form-submit").click();

await expect(page).toHaveURL("/@admin/" + name);
// Workaround: OutdatedAgent lands at "http://localhost:3111/@admin/8d6225b7?resources=echo_dev"
// and this is also a correct location.
await page.waitForURL(new RegExp("/@admin/" + name));

await page.waitForSelector("*[data-testid='build-status'] >> text=Running", {
state: "visible",
Expand Down
2 changes: 2 additions & 0 deletions site/e2e/tests/outdatedAgent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const agentVersion = "v0.27.0";
test.beforeEach(async ({ page }) => await beforeCoderTest(page));

test("ssh with agent " + agentVersion, async ({ page }) => {
test.setTimeout(40_000); // This is a slow test, 20s may not be enough on Mac.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And they call them 'runners' :D


const token = randomUUID();
const template = await createTemplate(page, {
apply: [
Expand Down
Loading