Skip to content

Commit 501fe43

Browse files
Check amqp for null before closing it
1 parent 3664f6a commit 501fe43

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

selenium/test/authnz-msg-protocols/amqp10.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ describe('Having AMQP 1.0 protocol enabled and the following auth_backends: ' +
6969
verifyAll(expectations)
7070
}
7171
try {
72-
closeAmqp(amqp.connection)
72+
if (amqp != null) {
73+
closeAmqp(amqp.connection)
74+
}
7375
} catch (error) {
7476
console.error("Failed to close amqp10 connection due to " + error);
7577
}

selenium/test/connections/amqp10/sessions-for-monitoring-user.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function
111111
after(async function () {
112112
await teardown(driver, this, captureScreen)
113113
try {
114-
closeAmqp(amqp.connection)
114+
if (amqp != null) {
115+
closeAmqp(amqp.connection)
116+
}
115117
} catch (error) {
116118
console.error("Failed to close amqp10 connection due to " + error);
117119
}

0 commit comments

Comments
 (0)