The URLConnection class has a "connectTimeout" setting that is not represented in the GitlabAPI class.
The result is a default wait of 2 minutes, which is not a productive option.
Check easily:
@Test
public void unitTest_20180417005924() {
try {
System.out.println(new Date());
GitlabAPI api = GitlabAPI.connect("http://10.1.10.130:10080" ,"blabla");
api.getVersion();
} catch (Exception e) {
System.out.println(new Date());
System.out.println(e.getMessage());
}
}
Result:
Tue Apr 17 01:03:21 MSK 2018
Tue Apr 17 01:05:31 MSK 2018
Connection timed out (Connection timed out)
The URLConnection class has a "connectTimeout" setting that is not represented in the GitlabAPI class.
The result is a default wait of 2 minutes, which is not a productive option.
Check easily:
Result: