Skip to content

Log in Goroutine after test ended #189

@jaredoconnell

Description

@jaredoconnell

This is caused by the code not waiting for the goroutine to finish.

   panic: Log in goroutine after TestExpressionWithWhitespace has completed: 2024-06-12T16:33:59Z	info	source=plugin-provider	ATP signal loop done
  
  
  goroutine 445 [running]:
  testing.(*common).logDepth(0xc000082820, {0xc00001c910, 0x46}, 0x3)
  	/opt/hostedtoolcache/go/1.21.11/x64/src/testing/testing.go:1022 +0x4c5
  testing.(*common).log(...)
  	/opt/hostedtoolcache/go/1.21.11/x64/src/testing/testing.go:1004
  testing.(*common).Log(0xc000082820, {0xc00017b780?, 0x6f6da0?, 0xc00017b701?})
  	/opt/hostedtoolcache/go/1.21.11/x64/src/testing/testing.go:1045 +0x4a
  go.arcalot.io/log/v2.targetWriter.Write({0xc000184270?}, {{0xc192915de90312a8, 0x2793bba4, 0x9e19c0}, {0x762a02, 0x4}, 0xc00028edb0, {0xc000020780, 0x14}})
  	/home/runner/go/pkg/mod/go.arcalot.io/log/v2@v2.1.0/writer_target.go:15 +0xf6
  go.arcalot.io/log/v2.logger.Writef({{0x762cd6, 0x5}, {0x7e3ff0, 0xc000228020}, 0xc00028edb0}, {0x762a02, 0x4}, {0x768870, 0x14}, {0x0, ...})
  	/home/runner/go/pkg/mod/go.arcalot.io/log/v2@v2.1.0/logger.go:105 +0x184
  go.arcalot.io/log/v2.logger.Infof(...)
  	/home/runner/go/pkg/mod/go.arcalot.io/log/v2@v2.1.0/logger.go:90
  go.flow.arcalot.io/pluginsdk/atp.(*client).executeWriteLoop(0xc000224000, {0xc0000c0eb0, 0x6}, 0xc0003d6660)
  	/home/runner/go/pkg/mod/go.flow.arcalot.io/pluginsdk@v0.12.1/atp/client.go:275 +0x5f9
  go.flow.arcalot.io/pluginsdk/atp.(*client).Execute.func1()
  	/home/runner/go/pkg/mod/go.flow.arcalot.io/pluginsdk@v0.12.1/atp/client.go:179 +0x25
  created by go.flow.arcalot.io/pluginsdk/atp.(*client).Execute in goroutine 444
  	/home/runner/go/pkg/mod/go.flow.arcalot.io/pluginsdk@v0.12.1/atp/client.go:178 +0x38f

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions