Skip to content

Commit 07057e6

Browse files
committed
Fixed failing test-case in cluster_status_options.js:
The previous patch added the usage of a debug trap in a test-case of this file, however, the flag {!__dbug_off} was not added resulting in a test-failure when running with debug mode disabled. Change-Id: I6ff0307506f49d0d8d0c165042e2825dd22af492
1 parent 405f5dc commit 07057e6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

unittest/scripts/auto/js_adminapi/scripts/cluster_status_options.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,14 +1105,16 @@ for (i = 0; i < NUM_DATA_ROWS; i++) {
11051105
var stat = cluster.status({extended:1});
11061106
var comm_stack = json_find_key(stat, "defaultReplicaSet")["communicationStack"];
11071107

1108-
//@<> XCOM stack
1108+
session.close();
11091109

1110-
// Drop replication accounts
1110+
//@<> Verify that any error present in PFS is added to the status of the members when calling cluster.status() {!__dbug_off}
11111111
if (comm_stack == "XCOM") {
1112-
var accounts = session.runSql("select concat(user, '@', quote(host)) from mysql.user where user like 'mysql_innodb_cluster%'").fetchAll();
1112+
// Drop replication accounts
1113+
var session1 = mysql.getSession(__sandbox_uri1);
1114+
var accounts = session1.runSql("select concat(user, '@', quote(host)) from mysql.user where user like 'mysql_innodb_cluster%'").fetchAll();
11131115
for (var i in accounts) {
11141116
var user = accounts[i][0];
1115-
session.runSql("drop user "+user);
1117+
session1.runSql("drop user "+user);
11161118
}
11171119

11181120
testutil.startSandbox(__mysql_sandbox_port2);
@@ -1122,6 +1124,7 @@ if (comm_stack == "XCOM") {
11221124
cluster.rejoinInstance(__sandbox_uri2);
11231125

11241126
EXPECT_EQ(1045, testutil.waitForReplConnectionError(__mysql_sandbox_port2));
1127+
testutil.dbugSet("");
11251128

11261129
var stat = cluster.status({extended:3});
11271130
println(stat);
@@ -1134,10 +1137,8 @@ if (comm_stack == "XCOM") {
11341137
EXPECT_EQ("CONNECTION_ERROR", recovery["state"]);
11351138
EXPECT_NE(undefined, recovery["receiverErrorNumber"]);
11361139
EXPECT_NE(undefined, recovery["state"]);
1137-
}
1138-
1139-
//@<> MYSQL stack {!__dbug_off}
1140-
if (comm_stack == "MYSQL") {
1140+
session1.close();
1141+
} else if (comm_stack == "MYSQL") {
11411142
testutil.startSandbox(__mysql_sandbox_port2);
11421143

11431144
testutil.dbugSet("+d,fail_recovery_mysql_stack");

0 commit comments

Comments
 (0)