From ea16da0468d0dd01b9f1020c3b82d27ba5039136 Mon Sep 17 00:00:00 2001 From: award999 Date: Thu, 19 Dec 2024 15:24:51 -0500 Subject: [PATCH] Fix flaky package dependency tests (#1288) * Seem to be intermittent failures if defaultPackage was not in the the workspace context as a package folder so lets be explicit Issue: #1258 --- test/integration-tests/commands/build.test.ts | 2 +- test/integration-tests/ui/PackageDependencyProvider.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration-tests/commands/build.test.ts b/test/integration-tests/commands/build.test.ts index 788a9092..59d6b120 100644 --- a/test/integration-tests/commands/build.test.ts +++ b/test/integration-tests/commands/build.test.ts @@ -42,7 +42,7 @@ suite("Build Commands @slow", function () { // The description of this package is crashing on Windows with Swift 5.9.x and below if ( process.platform === "win32" && - ctx.toolchain.swiftVersion.isLessThan(new Version(6, 0, 0)) + ctx.toolchain.swiftVersion.isLessThanOrEqual(new Version(5, 9, 0)) ) { this.skip(); } diff --git a/test/integration-tests/ui/PackageDependencyProvider.test.ts b/test/integration-tests/ui/PackageDependencyProvider.test.ts index 6eb79235..75f6ea6a 100644 --- a/test/integration-tests/ui/PackageDependencyProvider.test.ts +++ b/test/integration-tests/ui/PackageDependencyProvider.test.ts @@ -32,10 +32,11 @@ suite("PackageDependencyProvider Test Suite", function () { async setup(ctx) { const workspaceContext = ctx; await waitForNoRunningTasks(); + await folderInRootWorkspace("defaultPackage", workspaceContext); const folderContext = await folderInRootWorkspace("dependencies", workspaceContext); await executeTaskAndWaitForResult((await getBuildAllTask(folderContext)) as SwiftTask); - await workspaceContext.focusFolder(folderContext); treeProvider = new PackageDependenciesProvider(workspaceContext); + await workspaceContext.focusFolder(folderContext); }, async teardown() { treeProvider.dispose();