Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a2f440d

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: add logging in case of infinite loop
test-inspector-contexts may be entering an infinite loop (or very long-running loop) in CI, resulting in flakiness. Or maybe not. Add logging to find out. PR-URL: #30649 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3e3ad39 commit a2f440d
Copy full SHA for a2f440d

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎test/sequential/test-inspector-contexts.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-inspector-contexts.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ async function testContextCreatedAndDestroyed() {
6565
JSON.stringify(contextCreated));
6666

6767
// GC is unpredictable...
68+
console.log('Checking/waiting for GC.');
6869
while (!contextDestroyed)
6970
global.gc();
71+
console.log('Context destroyed.');
7072

7173
assert.strictEqual(contextDestroyed.params.executionContextId, id,
7274
JSON.stringify(contextDestroyed));
@@ -95,8 +97,10 @@ async function testContextCreatedAndDestroyed() {
9597
JSON.stringify(contextCreated));
9698

9799
// GC is unpredictable...
100+
console.log('Checking/waiting for GC again.');
98101
while (!contextDestroyed)
99102
global.gc();
103+
console.log('Other context destroyed.');
100104
}
101105

102106
{
@@ -119,8 +123,10 @@ async function testContextCreatedAndDestroyed() {
119123
JSON.stringify(contextCreated));
120124

121125
// GC is unpredictable...
126+
console.log('Checking/waiting for GC a third time.');
122127
while (!contextDestroyed)
123128
global.gc();
129+
console.log('Context destroyed once again.');
124130
}
125131

126132
{
@@ -141,8 +147,10 @@ async function testContextCreatedAndDestroyed() {
141147
JSON.stringify(contextCreated));
142148

143149
// GC is unpredictable...
150+
console.log('Checking/waiting for GC a fourth time.');
144151
while (!contextDestroyed)
145152
global.gc();
153+
console.log('Context destroyed a fourth time.');
146154
}
147155
}
148156

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.