Skip to content

Commit e7b52d7

Browse files
committed
Add setConnectTimeout and setReadTimeout #54
1 parent df507c8 commit e7b52d7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/main/java/es/upv/i3m/grycap/im/InfrastructureManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private ImClient getImClient() {
100100
}
101101

102102
/**
103-
* Set the client connection timeout.
103+
* Set the client connection timeout in milliseconds.
104104
*
105105
* @param connectTimeout
106106
* : int with the client connection timeout
@@ -110,7 +110,7 @@ public void setConnectTimeout(final int connectTimeout) {
110110
}
111111

112112
/**
113-
* Set the client read timeout.
113+
* Set the client read timeout in milliseconds.
114114
*
115115
* @param readTimeout
116116
* : int with the client read timeout

src/main/java/es/upv/i3m/grycap/im/rest/client/ImClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public ImClient(final String targetUrl, final String authorizationHeader)
8787
}
8888

8989
/**
90-
* Set the client connection timeout.
90+
* Set the client connection timeout in milliseconds.
9191
*
9292
* @param connectTimeout
9393
* : int with the client connection timeout
@@ -97,7 +97,7 @@ public void setConnectTimeout(final int connectTimeout) {
9797
}
9898

9999
/**
100-
* Set the client read timeout.
100+
* Set the client read timeout in milliseconds.
101101
*
102102
* @param readTimeout
103103
* : int with the client read timeout

src/test/java/es/upv/i3m/grycap/im/InfrastructureManagerTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public static void setRestClient() {
9999
try {
100100
im = new InfrastructureManager(IM_DUMMY_PROVIDER_URL,
101101
Paths.get(AUTH_FILE_PATH));
102+
im.setConnectTimeout(100000);
103+
im.setReadTimeout(100000);
102104
} catch (ImClientException exception) {
103105
ImJavaApiLogger.severe(InfrastructureManagerTest.class,
104106
exception.getMessage());

0 commit comments

Comments
 (0)