HADOOP-14715. TestWasbRemoteCallHelper failing.

Contributed by Esfandiar Manii.
This commit is contained in:
Steve Loughran 2017-08-08 23:37:47 +01:00
parent 71b8dda4f6
commit f4e1aa0508
No known key found for this signature in database
GPG Key ID: 950CC3E032B79CA2
2 changed files with 12 additions and 6 deletions

View File

@ -282,6 +282,8 @@ public void testFailureCodeJSONResponse() throws Throwable {
@Test
public void testWhenOneInstanceIsDown() throws Throwable {
boolean isAuthorizationCachingEnabled = fs.getConf().getBoolean(CachingAuthorizer.KEY_AUTH_SERVICE_CACHING_ENABLE, false);
// set up mocks
HttpClient mockHttpClient = Mockito.mock(HttpClient.class);
HttpEntity mockHttpEntity = Mockito.mock(HttpEntity.class);
@ -356,8 +358,9 @@ class HttpGetForServiceLocal extends ArgumentMatcher<HttpGet>{
performop(mockHttpClient);
Mockito.verify(mockHttpClient, times(2)).execute(Mockito.argThat(new HttpGetForServiceLocal()));
Mockito.verify(mockHttpClient, times(2)).execute(Mockito.argThat(new HttpGetForService2()));
int expectedNumberOfInvocations = isAuthorizationCachingEnabled ? 1 : 2;
Mockito.verify(mockHttpClient, times(expectedNumberOfInvocations)).execute(Mockito.argThat(new HttpGetForServiceLocal()));
Mockito.verify(mockHttpClient, times(expectedNumberOfInvocations)).execute(Mockito.argThat(new HttpGetForService2()));
}
@Test

View File

@ -29,10 +29,13 @@
</property>
-->
<property>
<name>fs.azure.secure.mode</name>
<value>true</value>
</property>
<!-- uncomment to test in Azure secure mode -->
<!--
<property>
<name>fs.azure.secure.mode</name>
<value>true</value>
</property>
-->
<property>
<name>fs.azure.user.agent.prefix</name>