@@ -65,8 +65,10 @@ async function testContextCreatedAndDestroyed() {
65
65
JSON . stringify ( contextCreated ) ) ;
66
66
67
67
// GC is unpredictable...
68
+ console . log ( 'Checking/waiting for GC.' ) ;
68
69
while ( ! contextDestroyed )
69
70
global . gc ( ) ;
71
+ console . log ( 'Context destroyed.' ) ;
70
72
71
73
assert . strictEqual ( contextDestroyed . params . executionContextId , id ,
72
74
JSON . stringify ( contextDestroyed ) ) ;
@@ -95,8 +97,10 @@ async function testContextCreatedAndDestroyed() {
95
97
JSON . stringify ( contextCreated ) ) ;
96
98
97
99
// GC is unpredictable...
100
+ console . log ( 'Checking/waiting for GC again.' ) ;
98
101
while ( ! contextDestroyed )
99
102
global . gc ( ) ;
103
+ console . log ( 'Other context destroyed.' ) ;
100
104
}
101
105
102
106
{
@@ -119,8 +123,10 @@ async function testContextCreatedAndDestroyed() {
119
123
JSON . stringify ( contextCreated ) ) ;
120
124
121
125
// GC is unpredictable...
126
+ console . log ( 'Checking/waiting for GC a third time.' ) ;
122
127
while ( ! contextDestroyed )
123
128
global . gc ( ) ;
129
+ console . log ( 'Context destroyed once again.' ) ;
124
130
}
125
131
126
132
{
@@ -141,8 +147,10 @@ async function testContextCreatedAndDestroyed() {
141
147
JSON . stringify ( contextCreated ) ) ;
142
148
143
149
// GC is unpredictable...
150
+ console . log ( 'Checking/waiting for GC a fourth time.' ) ;
144
151
while ( ! contextDestroyed )
145
152
global . gc ( ) ;
153
+ console . log ( 'Context destroyed a fourth time.' ) ;
146
154
}
147
155
}
148
156
0 commit comments