From bd18e975c0b56f5cff335aaa575181e9e18014bd Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Tue, 28 Jul 2020 21:30:31 +0800 Subject: [PATCH] fix windows compile bug (#9741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 灵洵 --- .../gcs/gcs_client/test/service_based_gcs_client_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc b/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc index d1aa16154..bdb1ea1af 100644 --- a/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc +++ b/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc @@ -1140,12 +1140,12 @@ TEST_F(ServiceBasedGcsClientTest, TestMultiThreadSubAndUnsub) { threads.resize(size); // The number of times each thread executes subscribe & resubscribe & unsubscribe. - const int sub_and_unsub_loop_count = 20; + int sub_and_unsub_loop_count = 20; // Multithreading subscribe/resubscribe/unsubscribe actors. auto job_id = JobID::FromInt(1); for (int index = 0; index < size; ++index) { - threads[index].reset(new std::thread([this, job_id] { + threads[index].reset(new std::thread([this, sub_and_unsub_loop_count, job_id] { for (int index = 0; index < sub_and_unsub_loop_count; ++index) { auto actor_id = ActorID::Of(job_id, RandomTaskId(), 0); ASSERT_TRUE(SubscribeActor( @@ -1162,7 +1162,7 @@ TEST_F(ServiceBasedGcsClientTest, TestMultiThreadSubAndUnsub) { // Multithreading subscribe/resubscribe/unsubscribe objects. for (int index = 0; index < size; ++index) { - threads[index].reset(new std::thread([this] { + threads[index].reset(new std::thread([this, sub_and_unsub_loop_count] { for (int index = 0; index < sub_and_unsub_loop_count; ++index) { auto object_id = ObjectID::FromRandom(); ASSERT_TRUE(SubscribeToLocations(