@@ -49,40 +49,28 @@ suite('Debug - StreamDebugAdapter', () => {
49
49
ensureNoDisposablesAreLeakedInTestSuite ( ) ;
50
50
51
51
test ( `StreamDebugAdapter (NamedPipeDebugAdapter) can initialize a connection` , async ( ) => {
52
- // todo@connor 4312: debug test failure that seems to only happen in CI.
53
- // Even running this test on a loop on my machine for an hour doesn't hit failures :(
54
- const progress : string [ ] = [ ] ;
55
- const timeout = setTimeout ( ( ) => {
56
- console . log ( 'NamedPipeDebugAdapter test might fail. Progress:' , progress . join ( ',' ) ) ;
57
- } , 1000 ) ; // should usually finish is <10ms
58
52
59
53
const pipeName = crypto . randomBytes ( 10 ) . toString ( 'hex' ) ;
60
54
const pipePath = platform . isWindows ? join ( '\\\\.\\pipe\\' , pipeName ) : join ( tmpdir ( ) , pipeName ) ;
61
- progress . push ( `listen on ${ pipePath } ` ) ;
62
55
const server = await new Promise < net . Server > ( ( resolve , reject ) => {
63
56
const server = net . createServer ( serverConnection ) ;
64
57
server . once ( 'listening' , ( ) => resolve ( server ) ) ;
65
58
server . once ( 'error' , reject ) ;
66
59
server . listen ( pipePath ) ;
67
60
} ) ;
68
- progress . push ( 'server up' ) ;
69
61
70
62
const debugAdapter = new NamedPipeDebugAdapter ( {
71
63
type : 'pipeServer' ,
72
64
path : pipePath
73
65
} ) ;
74
66
try {
75
67
await debugAdapter . startSession ( ) ;
76
- progress . push ( 'started session' ) ;
77
68
const response : DebugProtocol . Response = await sendInitializeRequest ( debugAdapter ) ;
78
- progress . push ( 'got response' ) ;
79
69
assert . strictEqual ( response . command , 'initialize' ) ;
80
70
assert . strictEqual ( response . request_seq , 1 ) ;
81
71
assert . strictEqual ( response . success , true , response . message ) ;
82
72
} finally {
83
73
await debugAdapter . stopSession ( ) ;
84
- progress . push ( 'stopped session' ) ;
85
- clearTimeout ( timeout ) ;
86
74
server . close ( ) ;
87
75
debugAdapter . dispose ( ) ;
88
76
}
0 commit comments