Skip to content

Commit a58f5dd

Browse files
committed
fix: use credentials from existing client in custom OkHttpClient test
The test was using System.getenv() to read API credentials directly, but the Gradle test JVM receives credentials as system properties (from local.properties), not environment variables. Reuse the already- initialized client's credentials, consistent with other tests. Made-with: Cursor
1 parent 5a65825 commit a58f5dd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/test/java/io/getstream/StreamHTTPClientTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ void testCustomOkHttpClientPreservesConfig() {
149149
.readTimeout(45, TimeUnit.SECONDS)
150150
.build();
151151

152-
var sdkClient =
153-
new StreamSDKClient(
154-
System.getenv("STREAM_API_KEY"), System.getenv("STREAM_API_SECRET"), customHttp);
152+
var sdkClient = new StreamSDKClient(client.getApiKey(), client.getApiSecret(), customHttp);
155153
OkHttpClient builtClient = sdkClient.getHttpClient().getHttpClient();
156154

157155
assertSame(customPool, builtClient.connectionPool());

0 commit comments

Comments
 (0)