test/integration/goDebug.test.ts: enable disconnect tests
Change-Id: I9bb438215118c1cedb6648f6e1b2480bab9cd21d
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/333290
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts
index 9328784..c3284c9 100644
--- a/test/integration/goDebug.test.ts
+++ b/test/integration/goDebug.test.ts
@@ -1483,11 +1483,7 @@
await new Promise((resolve) => setTimeout(resolve, 2_000));
});
- test('should disconnect while continuing on entry', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect while continuing on entry', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const config = {
@@ -1504,11 +1500,7 @@
await Promise.all([dc.disconnectRequest({ restart: false }), dc.waitForEvent('terminated')]);
});
- test('should disconnect with multiple disconnectRequests', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect with multiple disconnectRequests', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const config = {
@@ -1524,16 +1516,16 @@
await Promise.all([dc.configurationSequence(), dc.launch(debugConfig)]);
await Promise.all([
- dc.disconnectRequest({ restart: false }).then(() => dc.disconnectRequest({ restart: false })),
+ new Promise<void>((resolve) => {
+ dc.disconnectRequest({ restart: false });
+ dc.disconnectRequest({ restart: false });
+ resolve();
+ }),
dc.waitForEvent('terminated')
]);
});
- test('should disconnect after continue', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect after continue', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const config = {
@@ -1553,11 +1545,7 @@
await Promise.all([dc.disconnectRequest({ restart: false }), dc.waitForEvent('terminated')]);
});
- test('should disconnect while nexting', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect while nexting', async () => {
const PROGRAM = path.join(DATA_ROOT, 'sleep');
const FILE = path.join(DATA_ROOT, 'sleep', 'sleep.go');
const BREAKPOINT_LINE = 11;
@@ -1580,11 +1568,7 @@
await Promise.all([dc.disconnectRequest({ restart: false }), dc.waitForEvent('terminated')]);
});
- test('should disconnect while paused on pause', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect while paused on pause', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const config = {
@@ -1604,11 +1588,7 @@
await Promise.all([dc.disconnectRequest({ restart: false }), dc.waitForEvent('terminated')]);
});
- test('should disconnect while paused on breakpoint', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect while paused on breakpoint', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const FILE = path.join(PROGRAM, 'loop.go');
const BREAKPOINT_LINE = 5;
@@ -1627,11 +1607,7 @@
await Promise.all([dc.disconnectRequest({ restart: false }), dc.waitForEvent('terminated')]);
});
- test('should disconnect while paused on entry', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect while paused on entry', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const config = {
@@ -1649,11 +1625,7 @@
await Promise.all([dc.disconnectRequest({ restart: false }), dc.waitForEvent('terminated')]);
});
- test('should disconnect while paused on next', async function () {
- if (isDlvDap && dlvDapSkipsEnabled) {
- this.skip(); // not working in dlv-dap.
- }
-
+ test('should disconnect while paused on next', async () => {
const PROGRAM = path.join(DATA_ROOT, 'loop');
const config = {