Remove unused throws from unit tests.

This commit is contained in:
Anu Thomas Chandy 2021-02-08 20:43:30 -08:00
Родитель 6af0c0913f
Коммит a6c229cc55
3 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -15,7 +15,6 @@ import com.azure.android.core.test.http.NoOpHttpClient;
import org.junit.jupiter.api.Test;
import java.net.MalformedURLException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@ -25,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
public class ProtocolPolicyTests {
@Test
public void withOverwrite() throws MalformedURLException {
public void withOverwrite() {
final HttpPipeline pipeline = createPipeline("ftp", "ftp://www.bing.com");
CountDownLatch latch = new CountDownLatch(1);
pipeline.send(createHttpRequest("http://www.bing.com"),
@ -50,7 +49,7 @@ public class ProtocolPolicyTests {
}
@Test
public void withNoOverwrite() throws MalformedURLException {
public void withNoOverwrite() {
final HttpPipeline pipeline = createPipeline("ftp", false, "https://www.bing.com");
CountDownLatch latch = new CountDownLatch(1);
pipeline.send(createHttpRequest("https://www.bing.com"),

Просмотреть файл

@ -68,7 +68,7 @@ public class RequestIdPolicyTests {
private static final String REQUEST_ID_HEADER = "x-ms-client-request-id";
@Test
public void newRequestIdForEachCall() throws Exception {
public void newRequestIdForEachCall() {
HttpPipeline pipeline = new HttpPipelineBuilder()
.httpClient(new NoOpHttpClient() {
String firstRequestId = null;
@ -130,7 +130,7 @@ public class RequestIdPolicyTests {
}
@Test
public void sameRequestIdForRetry() throws Exception {
public void sameRequestIdForRetry() {
final HttpPipeline pipeline = new HttpPipelineBuilder()
.httpClient(new NoOpHttpClient() {
String firstRequestId = null;

Просмотреть файл

@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class RetryPolicyTests {
@Test
public void retryEndOn501() throws Exception {
public void retryEndOn501() {
final HttpPipeline pipeline = new HttpPipelineBuilder()
.httpClient(new NoOpHttpClient() {
// Send 408, 500, 502, all retried, with a 501 ending
@ -79,7 +79,7 @@ public class RetryPolicyTests {
}
@Test
public void retryMax() throws Exception {
public void retryMax() {
final int maxRetries = 5;
final HttpPipeline pipeline = new HttpPipelineBuilder()
.httpClient(new NoOpHttpClient() {
@ -120,7 +120,7 @@ public class RetryPolicyTests {
}
@Test
public void fixedDelayRetry() throws Exception {
public void fixedDelayRetry() {
final int maxRetries = 5;
final long delayMillis = 500;
final HttpPipeline pipeline = new HttpPipelineBuilder()
@ -158,7 +158,7 @@ public class RetryPolicyTests {
}
@Test
public void exponentialDelayRetry() throws Exception {
public void exponentialDelayRetry() {
final int maxRetries = 5;
final long baseDelayMillis = 100;
final long maxDelayMillis = 1000;