YARN-11634. Speed-up TestTimelineClient (#6371)
The TimelineConnector.class has a hardcoded 1 minute connection time out, what makes the TestTimelineClient to a long running test (~15:30 min). Decrease the timeout to 10ms will speed up the test run (~56 sec).
This commit is contained in:
parent
01bde4afff
commit
5dd1977800
@ -78,7 +78,8 @@ public class TimelineConnector extends AbstractService {
|
|||||||
private static final Joiner JOINER = Joiner.on("");
|
private static final Joiner JOINER = Joiner.on("");
|
||||||
private static final Logger LOG =
|
private static final Logger LOG =
|
||||||
LoggerFactory.getLogger(TimelineConnector.class);
|
LoggerFactory.getLogger(TimelineConnector.class);
|
||||||
public final static int DEFAULT_SOCKET_TIMEOUT = 1 * 60 * 1000; // 1 minute
|
@VisibleForTesting
|
||||||
|
public static int DEFAULT_SOCKET_TIMEOUT = 60_000; // 1 minute
|
||||||
|
|
||||||
private SSLFactory sslFactory;
|
private SSLFactory sslFactory;
|
||||||
Client client;
|
Client client;
|
||||||
|
@ -78,6 +78,7 @@ public void setup() {
|
|||||||
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
||||||
conf.setFloat(YarnConfiguration.TIMELINE_SERVICE_VERSION, 1.0f);
|
conf.setFloat(YarnConfiguration.TIMELINE_SERVICE_VERSION, 1.0f);
|
||||||
client = createTimelineClient(conf);
|
client = createTimelineClient(conf);
|
||||||
|
TimelineConnector.DEFAULT_SOCKET_TIMEOUT = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
@ -88,6 +89,7 @@ public void tearDown() throws Exception {
|
|||||||
if (isSSLConfigured()) {
|
if (isSSLConfigured()) {
|
||||||
KeyStoreTestUtil.cleanupSSLConfig(keystoresDir, sslConfDir);
|
KeyStoreTestUtil.cleanupSSLConfig(keystoresDir, sslConfDir);
|
||||||
}
|
}
|
||||||
|
TimelineConnector.DEFAULT_SOCKET_TIMEOUT = 60_000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user