Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions desktop/internal/workbench/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ func newHarnessWithDriver(t testing.TB, options Options, open func(app.Config) (
// the serve loops; cancel them before waiting for every task.
h.app.stopAllPluginServers()
if p := h.app.project; p != nil {
// A running test, debug session or run makes closeProject ask for the
// exit confirmation, so finishCloseProject never stopped them. Release
// them the same way here: their cleanup tasks wait for each process to
// exit and leave the process ledger in the preference directory, and
// h.app.wait() below then waits for those tasks before TempDir removal.
h.app.stopTestsForProject(p)
h.app.stopDebugForProject(p)
h.app.stopRunsForProject(p)
h.app.stopBuild(p)
h.app.stopVcs(p)
p.cancel()
h.app.closeTree(p)
h.app.releaseProjectSearch(p)
Expand Down
5 changes: 4 additions & 1 deletion desktop/internal/workbench/title_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ func TestProviderDebugStartsTheNamedAdapter(t *testing.T) {
p.debug.adapters = []debugAdapter{decoy, named}
h.app.startProviderDebug(p, named.PluginID, core.BuildDebugPreparation{Adapter: named.Declaration.ID, Program: "bin/app", WorkingDirectory: "."}, nil)
session := p.debug.activeSession()
if session == nil || session.adapter.Declaration.ID != named.Declaration.ID {
if session == nil {
t.Fatal("the provider did not start a debug session")
}
if session.adapter.Declaration.ID != named.Declaration.ID {
t.Fatalf("session = %+v, want adapter %q", session, named.Declaration.ID)
}
launch := p.debug.pendingRemote.launchTarget
Expand Down
Loading