improve test to wait for nodes before getting the local node id