test/integration/goDebug: make logDest file less flaky

The test tried to read the logDest file as soon as the debug client
observed the 'terminated' event. It is possible that the thin adapter
didn't receive delve dap's log messages about the 'terminated' event
by the time when it tries to read the file. Make the debug client
issue disconnect command and wait for the client to complete the
stop sequence, before reading the logDest file.

Change-Id: I39a8d42d44e83d4e727cb010ad34b5297307ee16
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/317050
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts
index c509565..adfdd07 100644
--- a/test/integration/goDebug.test.ts
+++ b/test/integration/goDebug.test.ts
@@ -1786,6 +1786,8 @@
 
 			const debugConfig = await initializeDebugConfig(config);
 			await Promise.all([dc.configurationSequence(), dc.launch(debugConfig), dc.waitForEvent('terminated')]);
+			await dc.stop();
+			dc = undefined;
 			const dapLog = fs.readFileSync(DELVE_LOG)?.toString();
 			assert(
 				dapLog.includes('DAP server listening at') &&