adjust test timeout values
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
1a673b3567
commit
914a14a92a
2 changed files with 33 additions and 14 deletions
|
|
@ -63,7 +63,7 @@ public abstract class AbstractMcpAsyncClientTests {
|
|||
}
|
||||
|
||||
protected Duration getInitializationTimeout() {
|
||||
return Duration.ofSeconds(1);
|
||||
return Duration.ofSeconds(2);
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
|
|
@ -90,10 +90,10 @@ public abstract class AbstractMcpAsyncClientTests {
|
|||
|
||||
@Test
|
||||
void testConstructorWithInvalidArguments() {
|
||||
assertThatThrownBy(() -> McpClient.sync(null).build()).isInstanceOf(IllegalArgumentException.class)
|
||||
assertThatThrownBy(() -> McpClient.async(null).build()).isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessage("Transport must not be null");
|
||||
|
||||
assertThatThrownBy(() -> McpClient.sync(mcpTransport).requestTimeout(null).build())
|
||||
assertThatThrownBy(() -> McpClient.async(mcpTransport).requestTimeout(null).build())
|
||||
.isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessage("Request timeout must not be null");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,16 +48,18 @@ public abstract class AbstractMcpSyncClientTests {
|
|||
|
||||
abstract protected ClientMcpTransport createMcpTransport();
|
||||
|
||||
abstract protected void onStart();
|
||||
protected void onStart() {
|
||||
}
|
||||
|
||||
abstract protected void onClose();
|
||||
protected void onClose() {
|
||||
}
|
||||
|
||||
protected Duration getRequestTimeout() {
|
||||
return Duration.ofSeconds(10);
|
||||
}
|
||||
|
||||
protected Duration getInitializationTimeout() {
|
||||
return Duration.ofSeconds(1);
|
||||
return Duration.ofSeconds(2);
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
|
|
|
|||
Loading…
Reference in a new issue