Skip to content

Commit

Permalink
Fix TestExportingTraces race (#19592)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosstimothy authored Dec 21, 2022
1 parent ecf9e5c commit 3845f5b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tool/tsh/tsh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3616,11 +3616,6 @@ func spanAssertion(containsTSH, empty bool) func(t *testing.T, spans []*otlp.Sco
func TestForwardingTraces(t *testing.T) {
t.Parallel()

connector := mockConnector(t)
alice, err := types.NewUser("[email protected]")
require.NoError(t, err)
alice.SetRoles([]string{"access"})

cases := []struct {
name string
cfg func(c *tracing.Collector) service.TracingConfig
Expand Down Expand Up @@ -3664,6 +3659,12 @@ func TestForwardingTraces(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
tmpHomePath := t.TempDir()

connector := mockConnector(t)
alice, err := types.NewUser("[email protected]")
require.NoError(t, err)
alice.SetRoles([]string{"access"})

collector, err := tracing.NewCollector(tracing.CollectorConfig{})
require.NoError(t, err)

Expand Down Expand Up @@ -3734,11 +3735,6 @@ func TestForwardingTraces(t *testing.T) {
func TestExportingTraces(t *testing.T) {
t.Parallel()

connector := mockConnector(t)
alice, err := types.NewUser("[email protected]")
require.NoError(t, err)
alice.SetRoles([]string{"access"})

cases := []struct {
name string
cfg func(c *tracing.Collector) service.TracingConfig
Expand Down Expand Up @@ -3783,6 +3779,12 @@ func TestExportingTraces(t *testing.T) {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

connector := mockConnector(t)
alice, err := types.NewUser("[email protected]")
require.NoError(t, err)
alice.SetRoles([]string{"access"})

tmpHomePath := t.TempDir()

teleportCollector, err := tracing.NewCollector(tracing.CollectorConfig{})
Expand Down

0 comments on commit 3845f5b

Please sign in to comment.