Skip to content

Commit 60af3f9

Browse files
committed
remove unneeded test
1 parent 68aa851 commit 60af3f9

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

rmf/rmf-java-base/src/test/java/io/vrap/rmf/base/client/http/TelemetryMiddlewareTest.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616

1717
import io.vrap.rmf.base.client.*;
1818
import io.vrap.rmf.base.client.error.*;
19-
import io.vrap.rmf.base.client.oauth2.TokenSupplier;
2019

2120
import org.assertj.core.api.Assertions;
22-
import org.junit.jupiter.api.Test;
2321
import org.junit.jupiter.api.TestTemplate;
2422
import org.junit.jupiter.api.extension.ExtendWith;
2523

@@ -77,34 +75,6 @@ public void testHttpCounts(int statusCode, int count, int errorCount) throws URI
7775
Assertions.assertThat(middleware.errorCount).isEqualTo(errorCount);
7876
}
7977

80-
@Test
81-
public void testUnauthorized() throws URISyntaxException {
82-
TestTelemetryMiddleware middleware = new TestTelemetryMiddleware();
83-
84-
ApiHttpClient client = ClientBuilder
85-
.of(new TestHttpClient(request -> CompletableFuture
86-
.completedFuture(new ApiHttpResponse<>(200, new ApiHttpHeaders(), "".getBytes()))))
87-
.withApiBaseUrl(new URI(""))
88-
.withTokenSupplier((TokenSupplier) () -> {
89-
throw new UnauthorizedException(401, "", null, "", null);
90-
})
91-
.withTelemetryMiddleware(middleware)
92-
.withErrorMiddleware()
93-
.build();
94-
95-
final ApiHttpRequest request = new ApiHttpRequest(ApiHttpMethod.GET, URI.create("/"), new ApiHttpHeaders(),
96-
"".getBytes());
97-
try {
98-
blockingWait(client.execute(request), Duration.ofSeconds(1));
99-
}
100-
catch (ApiHttpException ignored) {
101-
int i = 1;
102-
}
103-
104-
Assertions.assertThat(middleware.count).isEqualTo(1);
105-
Assertions.assertThat(middleware.errorCount).isEqualTo(1);
106-
}
107-
10878
static class TestHttpClient implements VrapHttpClient {
10979
private final Function<ApiHttpRequest, CompletableFuture<ApiHttpResponse<byte[]>>> next;
11080

0 commit comments

Comments
 (0)