diff --git a/Makefile b/Makefile index 2620d7c9a0f020ed49add537ec97fa5abca64fd7..98dabb3f3da90dc7a66aebde6bb7399f03b16ff8 100644 --- a/Makefile +++ b/Makefile @@ -3154,6 +3154,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ src/core/lib/transport/transport_op_string.c \ diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 1430f9de58b6fb6ee7d4b72f509b3249cb9f16b3..b2fdce2963d5c2993ae87447631e20142f802906 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -676,11 +676,12 @@ int main(int argc, char **argv) { // If the LB server waits > 2000ms, the update arrives after the first two // request are done and the third pick is performed, which returns, in RR // fashion, the 1st server of the 1st update. Therefore, the second server of - // batch 1 is hit twice, whereas the first server of batch 2 is never hit. - tf_result = grpc::test_update(2100); - GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 2); - GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1); - GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1); + // batch 1 is hit at least one, whereas the first server of batch 2 is never + // hit. + tf_result = grpc::test_update(2500); + GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced >= 1); + GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced > 0); + GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced > 0); GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 0); grpc_shutdown(); diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index cfa29d0c02a6d3e09e34f39e7f24d4ea0a31dbf7..84a71d217d9f4c651fd4ca5b4e88d7d888a87c09 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -266,6 +266,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" /> </ItemGroup> @@ -476,6 +477,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c"> diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 913774d71e0aab13cfedafa4608cb981bd70cd51..18fe9264057ccf5500e6507504c41054ce322174 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -310,6 +310,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c"> <Filter>src\core\lib\transport</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c"> + <Filter>src\core\lib\transport</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c"> <Filter>src\core\lib\transport</Filter> </ClCompile> @@ -671,6 +674,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h"> <Filter>src\core\lib\transport</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h"> + <Filter>src\core\lib\transport</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h"> <Filter>src\core\lib\transport</Filter> </ClInclude>