HADOOP-14715. TestWasbRemoteCallHelper failing.
Contributed by Esfandiar Manii.
This commit is contained in:
parent
71b8dda4f6
commit
f4e1aa0508
|
@ -282,6 +282,8 @@ public class TestWasbRemoteCallHelper
|
|||
@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 @@ public class TestWasbRemoteCallHelper
|
|||
|
||||
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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue