Skip to content

Commit 70874ef

Browse files
committed
Bug#35857673 ndb.test_mgmd: testMgmd -n UnresolvedHosts1 and UnresolvedHosts2 fails
Increase wait time for trying to start a management node and a data node with bad hostname. Add an explicit check that data node failed due to unable to allocate node id. Change-Id: I68ae31f16dd3e2d8e93deda8f2b3e6dba5fe2dd1
1 parent 4e326c9 commit 70874ef

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

storage/ndb/test/ndbapi/testMgmd.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ runTestUnresolvedHosts1(NDBT_Context* ctx, NDBT_Step* step)
15281528
Mgmd mgmd(1);
15291529
int exit_value;
15301530
CHECK(mgmd.start_from_config_ini(wd.path()));
1531-
CHECK(mgmd.wait(exit_value, 50));
1531+
CHECK(mgmd.wait(exit_value));
15321532
CHECK(exit_value == 1);
15331533
return NDBT_OK;
15341534
}
@@ -1602,13 +1602,19 @@ runTestUnresolvedHosts2(NDBT_Context* ctx, NDBT_Step* step)
16021602

16031603
/* Start data node 2.
16041604
Expect it to run for at least 20 seconds, trying to allocate a node id.
1605-
But in the second 20-second interval, it will time out and shut down.
16061605
*/
16071606
int ndbd_exit_code;
16081607
Ndbd ndbd2(2);
16091608
CHECK(ndbd2.start(wd.path(), mgmd.connectstring(config)));
16101609
CHECK(ndbd2.wait(ndbd_exit_code, 200) == 0); // first 20-second wait
1611-
CHECK(ndbd2.wait(ndbd_exit_code, 200) == 1); // second 20-second wait
1610+
CHECK(ndbd2.wait(ndbd_exit_code, 400) == 1); // second 20-second wait
1611+
CHECK(ndbd1.stop());
1612+
CHECK(mgmd.stop());
1613+
1614+
BaseString mgmdlog = path(wd.path(), "ndb_145_cluster.log", nullptr);
1615+
Vector<BaseString> search_list;
1616+
search_list.push_back("Unable to allocate nodeid for NDB");
1617+
CHECK(Print_find_in_file(mgmdlog.c_str(), search_list) == true);
16121618

16131619
return NDBT_OK;
16141620
}

0 commit comments

Comments
 (0)