Skip to content

Commit

Permalink
fix: cli path issues for concurrent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiandoetsch committed Oct 29, 2024
1 parent fd54e35 commit 1fe6fbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions application/server/parallelization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func Test_Concurrent_CLI_Runs(t *testing.T) {
}
wg.Wait()

setUniqueCliPath(t, c)

clientParams := types.InitializeParams{
WorkspaceFolders: workspaceFolders,
InitializationOptions: types.Settings{
Expand Down
8 changes: 6 additions & 2 deletions application/server/server_smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,7 @@ func prepareInitParams(t *testing.T, cloneTargetDir string, c *config.Config) ty
Uri: uri.PathToUri(cloneTargetDir),
}

discovery := install.Discovery{}
c.CliSettings().SetPath(filepath.Join(t.TempDir(), discovery.ExecutableName(false)))
setUniqueCliPath(t, c)

clientParams := types.InitializeParams{
WorkspaceFolders: []types.WorkspaceFolder{folder},
Expand All @@ -742,6 +741,11 @@ func prepareInitParams(t *testing.T, cloneTargetDir string, c *config.Config) ty
return clientParams
}

func setUniqueCliPath(t *testing.T, c *config.Config) {

Check failure on line 744 in application/server/server_smoke_test.go

View workflow job for this annotation

GitHub Actions / lint

test helper function should start from t.Helper() (thelper)
discovery := install.Discovery{}
c.CliSettings().SetPath(filepath.Join(t.TempDir(), discovery.ExecutableName(false)))
}

func checkFeatureFlagStatus(t *testing.T, c *config.Config, loc *server.Local) {
t.Helper()
// only check on mt-us
Expand Down

0 comments on commit 1fe6fbc

Please sign in to comment.