mirror of
https://github.com/google/nomulus.git
synced 2025-05-29 00:40:09 +02:00
Merge JUnitBackport's expectThrows into assertThrows
More information: https://github.com/junit-team/junit5/issues/531 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187034408
This commit is contained in:
parent
f96a0b7da9
commit
606b470cd0
180 changed files with 1325 additions and 1381 deletions
|
@ -24,7 +24,7 @@ import static google.registry.testing.DatastoreHelper.persistResource;
|
|||
import static google.registry.testing.DatastoreHelper.persistSimpleResource;
|
||||
import static google.registry.testing.GcsTestingUtils.readGcsFile;
|
||||
import static google.registry.testing.GcsTestingUtils.writeGcsFile;
|
||||
import static google.registry.testing.JUnitBackports.expectThrows;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.testing.SystemInfo.hasCommand;
|
||||
import static google.registry.testing.TaskQueueHelper.assertNoTasksEnqueued;
|
||||
import static google.registry.testing.TaskQueueHelper.assertTasksEnqueued;
|
||||
|
@ -309,7 +309,7 @@ public class RdeUploadActionTest {
|
|||
RdeUploadAction action = createAction(uploadUrl);
|
||||
action.lazyJsch = Lazies.of(createThrowingJSchSpy(action.lazyJsch.get(), 3));
|
||||
RuntimeException thrown =
|
||||
expectThrows(RuntimeException.class, () -> action.runWithLock(uploadCursor));
|
||||
assertThrows(RuntimeException.class, () -> action.runWithLock(uploadCursor));
|
||||
assertThat(thrown).hasMessageThat().contains("The crow flies in square circles.");
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ public class RdeUploadActionTest {
|
|||
persistResource(
|
||||
Cursor.create(CursorType.RDE_STAGING, stagingCursor, Registry.get("tld")));
|
||||
ServiceUnavailableException thrown =
|
||||
expectThrows(
|
||||
assertThrows(
|
||||
ServiceUnavailableException.class, () -> createAction(null).runWithLock(uploadCursor));
|
||||
assertThat(thrown).hasMessageThat().contains("Waiting for RdeStagingAction to complete");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue