Skip to content

Commit 4641a09

Browse files
pawelzjeanbza
authored andcommitted
Preserve lowLevelHttpRequest, so that it's available to tests.
When lowLevelHttpRequest is not set via MockHttpTransport.Builder, buildRequest() creates a new instance of MockLowLevelHttpRequest. Due to what seems to be a bug, the newly created MLLHR wasn't saved to MHT instance. That means, getLowLevelHttpRequest() called on such instance returns null, making it impossible to inspect actual request being sent. For example, this bug made it impossible to verify headers of outbound HTTP requests. This CL mirrors a change in the github repository: 8b59272 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193200613
1 parent 2c810d5 commit 4641a09

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ public void testBuildGetRequest_preservesLoLevelHttpRequest() throws Exception {
4242
assertThat(actualRequest.getHeaders().get("foo")).containsExactly("bar");
4343
}
4444
}
45-

0 commit comments

Comments
 (0)