Skip to content

Commit b5f1bd1

Browse files
author
Praful Makani
authored
chore: remove deprecated method (#22)
1 parent c9c059b commit b5f1bd1

12 files changed

+12
-19
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static org.hamcrest.CoreMatchers.equalTo;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.fail;
2323

2424
import com.google.api.gax.grpc.testing.LocalChannelProvider;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import static org.hamcrest.CoreMatchers.containsString;
2020
import static org.hamcrest.CoreMatchers.equalTo;
2121
import static org.hamcrest.CoreMatchers.is;
22-
import static org.junit.Assert.assertThat;
22+
import static org.hamcrest.MatcherAssert.assertThat;
2323
import static org.junit.Assert.fail;
2424

2525
import com.google.api.gax.grpc.testing.LocalChannelProvider;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminClientTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@
2525
import com.google.cloud.NoCredentials;
2626
import com.google.cloud.Policy;
2727
import com.google.cloud.Role;
28-
import java.io.IOException;
2928
import java.util.Arrays;
3029
import org.junit.After;
3130
import org.junit.AfterClass;
3231
import org.junit.Before;
3332
import org.junit.BeforeClass;
34-
import org.junit.Rule;
3533
import org.junit.Test;
36-
import org.junit.rules.ExpectedException;
3734
import org.junit.runner.RunWith;
3835
import org.junit.runners.JUnit4;
3936

@@ -47,7 +44,6 @@ public class InstanceAdminClientTest {
4744
private LocalChannelProvider channelProvider;
4845
private Spanner spanner;
4946
private InstanceAdminClient client;
50-
@Rule public ExpectedException exception = ExpectedException.none();
5147

5248
@BeforeClass
5349
public static void startStaticServer() {
@@ -63,7 +59,7 @@ public static void stopServer() {
6359
}
6460

6561
@Before
66-
public void setUp() throws IOException {
62+
public void setUp() {
6763
serviceHelper.reset();
6864
channelProvider = serviceHelper.createChannelProvider();
6965
spanner =
@@ -77,7 +73,7 @@ public void setUp() throws IOException {
7773
}
7874

7975
@After
80-
public void tearDown() throws Exception {
76+
public void tearDown() {
8177
spanner.close();
8278
}
8379

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolLeakTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static org.hamcrest.CoreMatchers.equalTo;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.fail;
2323

2424
import com.google.api.gax.grpc.testing.LocalChannelProvider;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
import java.util.concurrent.CountDownLatch;
3737
import java.util.concurrent.TimeUnit;
3838
import java.util.concurrent.atomic.AtomicBoolean;
39-
import org.junit.Rule;
4039
import org.junit.Test;
41-
import org.junit.rules.ExpectedException;
4240
import org.junit.runner.RunWith;
4341
import org.junit.runners.Parameterized;
4442
import org.junit.runners.Parameterized.Parameter;
@@ -53,7 +51,6 @@
5351
*/
5452
@RunWith(Parameterized.class)
5553
public class SessionPoolStressTest extends BaseSessionPoolTest {
56-
@Rule public ExpectedException expectedException = ExpectedException.none();
5754

5855
@Parameter(0)
5956
public double writeSessionsFraction;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static org.hamcrest.CoreMatchers.equalTo;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.fail;
2323

2424
import com.google.api.core.ApiFunction;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.fail;
2323
import static org.mockito.Mockito.when;
2424

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222

2323
import com.google.api.gax.retrying.RetrySettings;
2424
import com.google.api.gax.rpc.ServerStreamingCallSettings;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerRetryHelperTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static org.hamcrest.CoreMatchers.equalTo;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.fail;
2323

2424
import com.google.common.base.Stopwatch;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerAbortedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static org.hamcrest.CoreMatchers.equalTo;
2020
import static org.hamcrest.CoreMatchers.is;
21-
import static org.junit.Assert.assertThat;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.fail;
2323

2424
import com.google.api.gax.core.NoCredentialsProvider;

0 commit comments

Comments
 (0)