mirror of
https://github.com/google/nomulus.git
synced 2025-06-11 23:14:45 +02:00
Remove more unnecessary "throws" declarations
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201243722
This commit is contained in:
parent
47322b7fcd
commit
ad73f3d167
61 changed files with 318 additions and 331 deletions
|
@ -187,14 +187,14 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRun_noTlds_returns204() throws Exception {
|
||||
public void testRun_noTlds_returns204() {
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(204);
|
||||
assertNoTasksEnqueued("mapreduce");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRun_tldWithoutEscrowEnabled_returns204() throws Exception {
|
||||
public void testRun_tldWithoutEscrowEnabled_returns204() {
|
||||
createTld("lol");
|
||||
persistResource(Registry.get("lol").asBuilder().setEscrowEnabled(false).build());
|
||||
clock.setTo(DateTime.parse("2000-01-01TZ"));
|
||||
|
@ -204,7 +204,7 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRun_tldWithEscrowEnabled_runsMapReduce() throws Exception {
|
||||
public void testRun_tldWithEscrowEnabled_runsMapReduce() {
|
||||
createTldWithEscrowEnabled("lol");
|
||||
clock.setTo(DateTime.parse("2000-01-01TZ"));
|
||||
action.run();
|
||||
|
@ -214,7 +214,7 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRun_withinTransactionCooldown_getsExcludedAndReturns204() throws Exception {
|
||||
public void testRun_withinTransactionCooldown_getsExcludedAndReturns204() {
|
||||
createTldWithEscrowEnabled("lol");
|
||||
clock.setTo(DateTime.parse("2000-01-01T00:04:59Z"));
|
||||
action.transactionCooldown = Duration.standardMinutes(5);
|
||||
|
@ -224,7 +224,7 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRun_afterTransactionCooldown_runsMapReduce() throws Exception {
|
||||
public void testRun_afterTransactionCooldown_runsMapReduce() {
|
||||
createTldWithEscrowEnabled("lol");
|
||||
clock.setTo(DateTime.parse("2000-01-01T00:05:00Z"));
|
||||
action.transactionCooldown = Duration.standardMinutes(5);
|
||||
|
@ -306,7 +306,7 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testManualRun_validParameters_runsMapReduce() throws Exception {
|
||||
public void testManualRun_validParameters_runsMapReduce() {
|
||||
createTldWithEscrowEnabled("lol");
|
||||
clock.setTo(DateTime.parse("2000-01-01TZ"));
|
||||
action.manual = true;
|
||||
|
|
|
@ -264,7 +264,7 @@ public class RdeUploadActionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRun() throws Exception {
|
||||
public void testRun() {
|
||||
createTld("lol");
|
||||
RdeUploadAction action = createAction(null);
|
||||
action.tld = "lol";
|
||||
|
|
|
@ -213,7 +213,7 @@ public class RdeContactInputTest {
|
|||
Optional<Integer> numberOfShards,
|
||||
int whichReader,
|
||||
int expectedOffset,
|
||||
int expectedMaxResults) throws Exception {
|
||||
int expectedMaxResults) {
|
||||
RdeContactInput input = getInput(numberOfShards);
|
||||
List<?> readers = input.createReaders();
|
||||
RdeContactReader reader = (RdeContactReader) readers.get(whichReader);
|
||||
|
@ -238,7 +238,7 @@ public class RdeContactInputTest {
|
|||
* @param expectedNumberOfReaders Expected size of the list returned
|
||||
*/
|
||||
private void assertNumberOfReaders(Optional<Integer> numberOfShards,
|
||||
int expectedNumberOfReaders) throws Exception {
|
||||
int expectedNumberOfReaders) {
|
||||
RdeContactInput input = getInput(numberOfShards);
|
||||
List<?> readers = input.createReaders();
|
||||
assertThat(readers).hasSize(expectedNumberOfReaders);
|
||||
|
|
|
@ -220,8 +220,10 @@ public class RdeHostInputTest {
|
|||
* @param expectedMaxResults Expected maxResults of the reader
|
||||
*/
|
||||
private void assertReaderConfigurations(
|
||||
Optional<Integer> numberOfShards, int whichReader, int expectedOffset, int expectedMaxResults)
|
||||
throws Exception {
|
||||
Optional<Integer> numberOfShards,
|
||||
int whichReader,
|
||||
int expectedOffset,
|
||||
int expectedMaxResults) {
|
||||
RdeHostInput input = getInput(numberOfShards);
|
||||
List<?> readers = input.createReaders();
|
||||
RdeHostReader reader = (RdeHostReader) readers.get(whichReader);
|
||||
|
@ -245,8 +247,8 @@ public class RdeHostInputTest {
|
|||
* @param numberOfShards Number of desired shards ({@link Optional#empty} uses default of 50)
|
||||
* @param expectedNumberOfReaders Expected size of the list returned
|
||||
*/
|
||||
private void assertNumberOfReaders(Optional<Integer> numberOfShards, int expectedNumberOfReaders)
|
||||
throws Exception {
|
||||
private void assertNumberOfReaders(
|
||||
Optional<Integer> numberOfShards, int expectedNumberOfReaders) {
|
||||
RdeHostInput input = getInput(numberOfShards);
|
||||
List<?> readers = input.createReaders();
|
||||
assertThat(readers).hasSize(expectedNumberOfReaders);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue