Skip to content

Commit ea06ea0

Browse files
committed
chore: add logging to determine test failure reason
- test is only failing on GH actions? - need more info other than an IOException as potentially a logic issue
1 parent b8f0434 commit ea06ea0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/java/dev/tomr/hcloud/component/http/HttpClientComponentTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,15 @@ void testHttpClientThrowsBadResponseGracefully() {
9999

100100
HetznerApiException hetznerApiException = assertThrows(
101101
HetznerApiException.class,
102-
() -> client.sendHttpRequest(TestModel.class, HOST + "badResponse", RequestVerb.GET, "")
102+
() -> {
103+
try {
104+
client.sendHttpRequest(TestModel.class, HOST + "badResponse", RequestVerb.GET, "");
105+
} catch (Exception e) {
106+
System.out.println(e.getMessage());
107+
e.printStackTrace();
108+
throw e;
109+
}
110+
}
103111
);
104112

105113
assertEquals("HetznerErrorResponse [code=uniqueness_error, message=SSH key with the same fingerprint already exists]", hetznerApiException.getMessage());

0 commit comments

Comments
 (0)