Remove unnecessary throws declaration in tests

See gh-26441
This commit is contained in:
weixsun
2021-05-13 00:22:53 +08:00
committed by Stephane Nicoll
parent 574655dc84
commit 8a2be288a3
129 changed files with 345 additions and 369 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,8 +16,6 @@
package org.springframework.boot.devtools.tests;
import java.io.IOException;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
@@ -49,7 +47,7 @@ class DevToolsWithLazyInitializationIntegrationTests extends AbstractDevToolsInt
assertThat(template.getForObject(urlBase + "/two", String.class)).isEqualTo("two");
}
static Object[] parameters() throws IOException {
static Object[] parameters() {
Directories directories = new Directories(buildOutput, temp);
return new Object[] { new Object[] { new LocalApplicationLauncher(directories) },
new Object[] { new ExplodedRemoteApplicationLauncher(directories) },

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -100,13 +100,13 @@ abstract class RemoteApplicationLauncher extends AbstractApplicationLauncher {
return StringUtils.collectionToDelimitedString(entries, File.pathSeparator);
}
private int awaitServerPort(LaunchedJvm jvm, File serverPortFile) throws Exception {
private int awaitServerPort(LaunchedJvm jvm, File serverPortFile) {
return Awaitility.waitAtMost(Duration.ofMinutes(3))
.until(() -> new ApplicationState(serverPortFile, jvm), ApplicationState::hasServerPort)
.getServerPort();
}
private void awaitRemoteSpringApplication(LaunchedJvm launchedJvm) throws Exception {
private void awaitRemoteSpringApplication(LaunchedJvm launchedJvm) {
FileContents contents = new FileContents(launchedJvm.getStandardOut());
try {
Awaitility.waitAtMost(Duration.ofMinutes(3)).until(contents::get,