Skip to content

Commit

Permalink
test: run slow fly pg import tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
kzys committed Aug 22, 2024
1 parent ff5cd12 commit 3867472
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/preflight/fly_postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ func assertPostgresIsUp(tb testing.TB, f *testlib.FlyctlTestEnv, appName string)
assert.Equal(tb, 0, ssh.ExitCode(), "failed to connect to postgres at %s: %s", appName, ssh.StdErr())
}

func TestPostgres_ImportSuccess(t *testing.T) {
func TestPostgresImport(t *testing.T) {
t.Run("Import", WithParallel(testPostgresImportSuccess))
t.Run("Failure", WithParallel(testPostgresImportFailure))
}

func testPostgresImportSuccess(t *testing.T) {
f := testlib.NewTestEnvFromEnv(t)

// Since this explicitly sets a size, no need to test on GPUs/alternate
Expand Down Expand Up @@ -227,7 +232,7 @@ func TestPostgres_ImportSuccess(t *testing.T) {
}, 2*time.Minute, 10*time.Second, "import machine not destroyed")
}

func TestPostgres_ImportFailure(t *testing.T) {
func testPostgresImportFailure(t *testing.T) {
f := testlib.NewTestEnvFromEnv(t)

// Since this explicitly sets a size, no need to test on GPUs/alternate
Expand Down

0 comments on commit 3867472

Please sign in to comment.