-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-17377: ABFS: MsiTokenProvider doesn't retry HTTP 429/410 from the Instance Metadata Service #5273
base: trunk
Are you sure you want to change the base?
HADOOP-17377: ABFS: MsiTokenProvider doesn't retry HTTP 429/410 from the Instance Metadata Service #5273
Changes from 2 commits
3f6386a
56c6f7d
2c25b39
88e51b6
3be0b00
e04011c
6283410
cf73a70
e6740a3
0688809
115e88a
fe15f44
01ec633
4faa92d
24c0483
99e66fa
8b5e883
1472eb8
7ba573f
3f80d00
462a3b6
78329de
240965d
b0563a1
225541e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ | |
import static org.junit.Assert.assertNotNull; | ||
import static org.junit.Assert.assertTrue; | ||
import static org.junit.Assert.fail; | ||
import static org.mockito.Matchers.any; | ||
import static org.mockito.Mockito.doThrow; | ||
import static org.mockito.Mockito.mock; | ||
import static org.apache.hadoop.test.Whitebox.getInternalState; | ||
|
@@ -73,6 +72,7 @@ | |
import org.apache.hadoop.ipc.StandbyException; | ||
import org.apache.hadoop.test.GenericTestUtils; | ||
import org.junit.Test; | ||
import org.mockito.Mockito; | ||
import org.slf4j.event.Level; | ||
|
||
/** | ||
|
@@ -423,7 +423,7 @@ public void testSubclusterDown() throws Exception { | |
FSNamesystem ns0 = nn0.getNamesystem(); | ||
HAContext nn0haCtx = (HAContext)getInternalState(ns0, "haContext"); | ||
HAContext mockCtx = mock(HAContext.class); | ||
doThrow(new StandbyException("Mock")).when(mockCtx).checkOperation(any()); | ||
doThrow(new StandbyException("Mock")).when(mockCtx).checkOperation(Mockito.any()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. return to the existing any() static import |
||
setInternalState(ns0, "haContext", mockCtx); | ||
|
||
// router0 should throw an exception | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1308,7 +1308,20 @@ | |
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>2.28.2</version> | ||
<version>4.11.0</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a new property mockito.version and reference in both places |
||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-inline</artifactId> | ||
<version>4.11.0</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,21 +321,13 @@ | |
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>4.11.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this needed? because its not in the base project pom. I would rather this PR doesn't need that mockito upgrade as mockito upgrades are always a painful piece of work which never gets backported. |
||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-inline</artifactId> | ||
<version>4.11.0</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reinstate so this file doesn't change