You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by je...@apache.org on 2020/04/30 09:55:27 UTC

[tez] branch master updated: TEZ-4164. Speed up TestFetcher

This is an automated email from the ASF dual-hosted git repository.

jeagles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/master by this push:
     new 33980b8  TEZ-4164. Speed up TestFetcher
33980b8 is described below

commit 33980b80ddad271112de66482435b2f5d5097b6f
Author: Jonathan Eagles <je...@apache.org>
AuthorDate: Thu Apr 30 04:55:17 2020 -0500

    TEZ-4164. Speed up TestFetcher
---
 .../runtime/library/common/shuffle/orderedgrouped/TestFetcher.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/TestFetcher.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/TestFetcher.java
index ec0eeee..5f7fe4b 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/TestFetcher.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/TestFetcher.java
@@ -616,10 +616,8 @@ public class TestFetcher {
     //Create read timeout when reading data
     doAnswer(new Answer<Void>() {
       @Override public Void answer(InvocationOnMock invocation) throws Throwable {
-        // Emulate host down for 4 seconds.
-        Thread.sleep(4000);
         doReturn(false).when(fetcher).setupConnection(any(MapHost.class), any(Collection.class));
-        // Throw IOException when fetcher tries to connect again to the same node
+        // Simulate read timeout by throwing proper exception
         throw new FetcherReadTimeoutException("creating fetcher socket read timeout exception");
       }
     }).when(fetcher).copyMapOutput(any(MapHost.class), any(DataInputStream.class), any(InputAttemptIdentifier.class));