@@ -1183,9 +1183,8 @@ func TestPostWorkspaceBuild(t *testing.T) {
1183
1183
})
1184
1184
}
1185
1185
1186
+ //nolint:paralleltest
1186
1187
func TestWorkspaceBuildTimings (t * testing.T ) {
1187
- t .Parallel ()
1188
-
1189
1188
// Setup the test environment with a template and version
1190
1189
db , pubsub := dbtestutil .NewDB (t )
1191
1190
client := coderdtest .New (t , & coderdtest.Options {
@@ -1238,9 +1237,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
1238
1237
})
1239
1238
}
1240
1239
1240
+ //nolint:paralleltest
1241
1241
t .Run ("NonExistentBuild" , func (t * testing.T ) {
1242
- t .Parallel ()
1243
-
1244
1242
// When: fetching an inexistent build
1245
1243
buildID := uuid .New ()
1246
1244
ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
@@ -1252,9 +1250,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
1252
1250
require .Contains (t , err .Error (), "not found" )
1253
1251
})
1254
1252
1253
+ //nolint:paralleltest
1255
1254
t .Run ("EmptyTimings" , func (t * testing.T ) {
1256
- t .Parallel ()
1257
-
1258
1255
// When: fetching timings for a build with no timings
1259
1256
build := makeBuild ()
1260
1257
ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
@@ -1267,9 +1264,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
1267
1264
require .Empty (t , res .AgentScriptTimings )
1268
1265
})
1269
1266
1267
+ //nolint:paralleltest
1270
1268
t .Run ("ProvisionerTimings" , func (t * testing.T ) {
1271
- t .Parallel ()
1272
-
1273
1269
// When: fetching timings for a build with provisioner timings
1274
1270
build := makeBuild ()
1275
1271
provisionerTimings := dbgen .ProvisionerJobTimings (t , db , build , 5 )
@@ -1294,9 +1290,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
1294
1290
}
1295
1291
})
1296
1292
1293
+ //nolint:paralleltest
1297
1294
t .Run ("AgentScriptTimings" , func (t * testing.T ) {
1298
- t .Parallel ()
1299
-
1300
1295
// When: fetching timings for a build with agent script timings
1301
1296
build := makeBuild ()
1302
1297
resource := dbgen .WorkspaceResource (t , db , database.WorkspaceResource {
@@ -1328,9 +1323,8 @@ func TestWorkspaceBuildTimings(t *testing.T) {
1328
1323
}
1329
1324
})
1330
1325
1326
+ //nolint:paralleltest
1331
1327
t .Run ("NoAgentScripts" , func (t * testing.T ) {
1332
- t .Parallel ()
1333
-
1334
1328
// When: fetching timings for a build with no agent scripts
1335
1329
build := makeBuild ()
1336
1330
resource := dbgen .WorkspaceResource (t , db , database.WorkspaceResource {
@@ -1349,16 +1343,16 @@ func TestWorkspaceBuildTimings(t *testing.T) {
1349
1343
})
1350
1344
1351
1345
// Some workspaces might not have agents. It is improbable, but possible.
1346
+ //nolint:paralleltest
1352
1347
t .Run ("NoAgents" , func (t * testing.T ) {
1353
- t .Parallel ()
1354
-
1355
1348
// When: fetching timings for a build with no agents
1356
1349
build := makeBuild ()
1357
1350
dbgen .WorkspaceResource (t , db , database.WorkspaceResource {
1358
1351
JobID : build .JobID ,
1359
1352
})
1360
1353
1361
1354
// Then: return a response with empty agent script timings
1355
+ // trigger build
1362
1356
ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
1363
1357
t .Cleanup (cancel )
1364
1358
res , err := client .WorkspaceBuildTimings (ctx , build .ID )
0 commit comments