HADOOP-14715. TestWasbRemoteCallHelper failing.
Contributed by Esfandiar Manii.
This commit is contained in:
parent
71b8dda4f6
commit
f4e1aa0508
@ -282,6 +282,8 @@ public void testFailureCodeJSONResponse() throws Throwable {
|
|||||||
@Test
|
@Test
|
||||||
public void testWhenOneInstanceIsDown() throws Throwable {
|
public void testWhenOneInstanceIsDown() throws Throwable {
|
||||||
|
|
||||||
|
boolean isAuthorizationCachingEnabled = fs.getConf().getBoolean(CachingAuthorizer.KEY_AUTH_SERVICE_CACHING_ENABLE, false);
|
||||||
|
|
||||||
// set up mocks
|
// set up mocks
|
||||||
HttpClient mockHttpClient = Mockito.mock(HttpClient.class);
|
HttpClient mockHttpClient = Mockito.mock(HttpClient.class);
|
||||||
HttpEntity mockHttpEntity = Mockito.mock(HttpEntity.class);
|
HttpEntity mockHttpEntity = Mockito.mock(HttpEntity.class);
|
||||||
@ -356,8 +358,9 @@ class HttpGetForServiceLocal extends ArgumentMatcher<HttpGet>{
|
|||||||
|
|
||||||
performop(mockHttpClient);
|
performop(mockHttpClient);
|
||||||
|
|
||||||
Mockito.verify(mockHttpClient, times(2)).execute(Mockito.argThat(new HttpGetForServiceLocal()));
|
int expectedNumberOfInvocations = isAuthorizationCachingEnabled ? 1 : 2;
|
||||||
Mockito.verify(mockHttpClient, times(2)).execute(Mockito.argThat(new HttpGetForService2()));
|
Mockito.verify(mockHttpClient, times(expectedNumberOfInvocations)).execute(Mockito.argThat(new HttpGetForServiceLocal()));
|
||||||
|
Mockito.verify(mockHttpClient, times(expectedNumberOfInvocations)).execute(Mockito.argThat(new HttpGetForService2()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -29,10 +29,13 @@
|
|||||||
</property>
|
</property>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<property>
|
<!-- uncomment to test in Azure secure mode -->
|
||||||
<name>fs.azure.secure.mode</name>
|
<!--
|
||||||
<value>true</value>
|
<property>
|
||||||
</property>
|
<name>fs.azure.secure.mode</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
-->
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<name>fs.azure.user.agent.prefix</name>
|
<name>fs.azure.user.agent.prefix</name>
|
||||||
|
Loading…
Reference in New Issue
Block a user