Skip to content

Commit d942d77

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 cd32758 commit d942d77

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

storage/ndb/test/ndbapi/testMgmd.cpp

+10-4
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ runTestUnresolvedHosts1(NDBT_Context* ctx, NDBT_Step* step)
16131613
Mgmd mgmd(1);
16141614
int exit_value;
16151615
CHECK(mgmd.start_from_config_ini(wd.path()));
1616-
CHECK(mgmd.wait(exit_value, 5000));
1616+
CHECK(mgmd.wait(exit_value));
16171617
CHECK(exit_value == 1);
16181618
return NDBT_OK;
16191619
}
@@ -1687,13 +1687,19 @@ runTestUnresolvedHosts2(NDBT_Context* ctx, NDBT_Step* step)
16871687

16881688
/* Start data node 2.
16891689
Expect it to run for at least 20 seconds, trying to allocate a node id.
1690-
But in the second 20-second interval, it will time out and shut down.
16911690
*/
16921691
int ndbd_exit_code;
16931692
Ndbd ndbd2(2);
16941693
CHECK(ndbd2.start(wd.path(), mgmd.connectstring(config)));
1695-
CHECK(ndbd2.wait(ndbd_exit_code, 20000) == 0); // first 20-second wait
1696-
CHECK(ndbd2.wait(ndbd_exit_code, 20000) == 1); // second 20-second wait
1694+
CHECK(ndbd2.wait(ndbd_exit_code, 20000) == 0);
1695+
CHECK(ndbd2.wait(ndbd_exit_code, 40000) == 1);
1696+
CHECK(ndbd1.stop());
1697+
CHECK(mgmd.stop());
1698+
1699+
BaseString mgmdlog = path(wd.path(), "ndb_145_cluster.log", nullptr);
1700+
Vector<BaseString> search_list;
1701+
search_list.push_back("Unable to allocate nodeid for NDB");
1702+
CHECK(Print_find_in_file(mgmdlog.c_str(), search_list) == true);
16971703

16981704
return NDBT_OK;
16991705
}

0 commit comments

Comments
 (0)