From 6fd4a306670fa82da06b42ef217705eefd97cbcd Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Thu, 9 Nov 2023 05:26:40 +0800 Subject: [PATCH] [coll] Increase timeout for allgather test. (#9777) --- tests/cpp/collective/test_allgather.cc | 2 +- tests/cpp/collective/test_worker.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/cpp/collective/test_allgather.cc b/tests/cpp/collective/test_allgather.cc index bdfadc0c7..decad8786 100644 --- a/tests/cpp/collective/test_allgather.cc +++ b/tests/cpp/collective/test_allgather.cc @@ -47,7 +47,7 @@ class Worker : public WorkerForTest { std::size_t n = 8192; // n_bytes = 8192 * sizeof(int) std::vector data(comm_.World() * n, 0); - auto s_data = common::Span{data.data(), data.size()}; + auto s_data = common::Span{data}; auto seg = s_data.subspan(comm_.Rank() * n, n); std::iota(seg.begin(), seg.end(), comm_.Rank()); diff --git a/tests/cpp/collective/test_worker.h b/tests/cpp/collective/test_worker.h index ad3213e81..490cdf13c 100644 --- a/tests/cpp/collective/test_worker.h +++ b/tests/cpp/collective/test_worker.h @@ -92,11 +92,12 @@ class TrackerTest : public SocketTest { template void TestDistributed(std::int32_t n_workers, WorkerFn worker_fn) { - std::chrono::seconds timeout{1}; + std::chrono::seconds timeout{2}; std::string host; auto rc = GetHostAddress(&host); ASSERT_TRUE(rc.OK()) << rc.Report(); + LOG(INFO) << "Using " << n_workers << " workers for test."; RabitTracker tracker{StringView{host}, n_workers, 0, timeout}; auto fut = tracker.Run();