Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

## [2.0.17] - 2023-03-20

### Changed

- Aligns default http client timeout to be 100 seconds
- Fixes NullPointerException in GraphErrorResponse#copy

## [2.0.16] - 2023-01-30
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mavenGroupId = com.microsoft.graph
mavenArtifactId = microsoft-graph-core
mavenMajorVersion = 2
mavenMinorVersion = 0
mavenPatchVersion = 16
mavenPatchVersion = 17
mavenArtifactSuffix =

#These values are used to run functional tests
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/microsoft/graph/httpcore/HttpClients.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.time.Duration;
import java.util.Objects;

/**
Expand All @@ -28,7 +29,10 @@ public static Builder custom() {
return new OkHttpClient.Builder()
.addInterceptor(new TelemetryHandler())
.followRedirects(false)
.followSslRedirects(false);
.followSslRedirects(false)
.connectTimeout(Duration.ofSeconds(100))
.readTimeout(Duration.ofSeconds(100))
.callTimeout(Duration.ofSeconds(100));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.microsoft.graph.httpcore;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;

Expand All @@ -16,6 +17,9 @@ public class HttpClientsTest {
public void testHttpClientCreation() {
OkHttpClient httpclient = HttpClients.createDefault(mock(IAuthenticationProvider.class));
assertTrue(httpclient != null);
assertEquals(100000,httpclient.readTimeoutMillis());
assertEquals(100000,httpclient.connectTimeoutMillis());
assertEquals(100000,httpclient.callTimeoutMillis());
}

@Test
Expand Down