Skip to content

Commit

Permalink
Enable pending tests + 5 min timeout for Setup
Browse files Browse the repository at this point in the history
Turn on some of the tests that are currently marked as pending. These
tests have been pending since the early days.

They may have some timing issues in KIND, but are successful on real
hardware.

Additionally, add 5 minute timeout for Setup state as lustre takes can
routinely take longer than 1 minute on internal systems.

Signed-off-by: Blake Devcich <[email protected]>
  • Loading branch information
bdevcich committed Oct 16, 2023
1 parent 6df15e0 commit 7cbef10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 5 additions & 7 deletions int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ var tests = []*T{
// ),

MakeTest("XFS", "#DW jobdw type=xfs name=xfs capacity=1TB").WithLabels(Simple),
MakeTest("GFS2", "#DW jobdw type=gfs2 name=gfs2 capacity=1TB").WithLabels(Simple).Pending(),
MakeTest("Lustre", "#DW jobdw type=lustre name=lustre capacity=1TB").WithLabels(Simple).Pending(),
MakeTest("GFS2", "#DW jobdw type=gfs2 name=gfs2 capacity=1TB").WithLabels(Simple),
MakeTest("Lustre", "#DW jobdw type=lustre name=lustre capacity=1TB").WithLabels(Simple),

DuplicateTest(
MakeTest("XFS", "#DW jobdw type=xfs name=xfs capacity=1TB").Pending(), // Will fail for Setup() exceeding time limit; needs investigation
Expand All @@ -64,8 +64,7 @@ var tests = []*T{
WithStorageProfile(),
MakeTest("GFS2 with Storage Profile",
"#DW jobdw type=gfs2 name=gfs2-storage-profile capacity=1TB profile=my-gfs2-storage-profile").
WithStorageProfile().
Pending(),
WithStorageProfile(),

// Persistent
MakeTest("Persistent Lustre",
Expand Down Expand Up @@ -164,21 +163,20 @@ var tests = []*T{
ExpectError(dwsv1alpha2.StateProposal).WithLabels("unsupported-fs"),

// Containers - Multiple Storages
// TODO: The timing on these needs some work, hence Pending()
MakeTest("GFS2 and Lustre with Containers",
"#DW jobdw name=containers-local-storage type=gfs2 capacity=100GB",
"#DW persistentdw name=containers-persistent-storage",
"#DW container name=gfs2-lustre-with-containers profile=example-success DW_JOB_foo_local_storage=containers-local-storage DW_PERSISTENT_foo_persistent_storage=containers-persistent-storage").
WithPersistentLustre("containers-persistent-storage").
WithPermissions(1050, 1051).
Pending(),
WithLabels("multi-storage"),
MakeTest("GFS2 and Lustre with Containers MPI",
"#DW jobdw name=containers-local-storage-mpi type=gfs2 capacity=100GB",
"#DW persistentdw name=containers-persistent-storage-mpi",
"#DW container name=gfs2-lustre-with-containers-mpi profile=example-mpi DW_JOB_foo_local_storage=containers-local-storage-mpi DW_PERSISTENT_foo_persistent_storage=containers-persistent-storage-mpi").
WithPersistentLustre("containers-persistent-storage-mpi").
WithPermissions(1050, 1051).
Pending(),
WithLabels("multi-storage"),

// External MGS
MakeTest("Lustre with MGS pool",
Expand Down
13 changes: 7 additions & 6 deletions internal/states.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,6 @@ func (t *T) teardown(ctx context.Context, k8sClient client.Client, workflow *dws
t.AdvanceStateAndWaitForReady(ctx, k8sClient, workflow, dwsv1alpha2.StateTeardown)
}

// func DataIn...
// func PreRun...
// func PostRun...
// func DataOut...

func (t *T) AdvanceStateAndWaitForReady(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha2.Workflow, state dwsv1alpha2.WorkflowState) {
By(fmt.Sprintf("Advances to %s State", state))

Expand Down Expand Up @@ -227,11 +222,17 @@ func waitForReady(ctx context.Context, k8sClient client.Client, workflow *dwsv1a
)
}

// Setup can sometimes take longer than 60s when using lustre, so use a larger timeout
timeout := time.Minute
if state == dwsv1alpha2.StateSetup {
timeout = 5 * time.Minute
}

Eventually(func() dwsv1alpha2.WorkflowStatus {
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(workflow), workflow)).Should(Succeed())
return workflow.Status
}).
WithTimeout(time.Minute).
WithTimeout(timeout).
WithPolling(time.Second).
Should(achieveState(state), fmt.Sprintf("achieve state '%s'", state))
}
Expand Down

0 comments on commit 7cbef10

Please sign in to comment.