Skip to content

Commit 189cd05

Browse files
Remove unused imports, before->beforeClass
1 parent 4711cd5 commit 189cd05

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageLateInitializationTest.java

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717
package com.google.cloud.storage.contrib.nio;
1818

19-
import com.google.common.collect.ImmutableList;
20-
import com.google.common.testing.NullPointerTester;
21-
import org.junit.Before;
19+
import org.junit.BeforeClass;
2220
import org.junit.Ignore;
2321
import org.junit.Rule;
2422
import org.junit.Test;
@@ -27,35 +25,10 @@
2725
import org.junit.runners.JUnit4;
2826

2927
import java.io.IOException;
30-
import java.io.InputStream;
31-
import java.io.OutputStream;
3228
import java.net.URI;
33-
import java.nio.ByteBuffer;
34-
import java.nio.channels.ReadableByteChannel;
35-
import java.nio.channels.SeekableByteChannel;
36-
import java.nio.file.AtomicMoveNotSupportedException;
37-
import java.nio.file.CopyOption;
38-
import java.nio.file.FileAlreadyExistsException;
39-
import java.nio.file.FileSystem;
40-
import java.nio.file.FileSystems;
4129
import java.nio.file.Files;
42-
import java.nio.file.NoSuchFileException;
43-
import java.nio.file.OpenOption;
44-
import java.nio.file.Path;
4530
import java.nio.file.Paths;
4631
import java.nio.file.spi.FileSystemProvider;
47-
import java.util.List;
48-
49-
import static com.google.cloud.storage.contrib.nio.CloudStorageFileSystem.forBucket;
50-
import static com.google.common.truth.Truth.assertThat;
51-
import static java.nio.charset.StandardCharsets.UTF_8;
52-
import static java.nio.file.StandardCopyOption.ATOMIC_MOVE;
53-
import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES;
54-
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
55-
import static java.nio.file.StandardOpenOption.CREATE;
56-
import static java.nio.file.StandardOpenOption.CREATE_NEW;
57-
import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
58-
import static java.nio.file.StandardOpenOption.WRITE;
5932

6033
/**
6134
* Unit tests for {@link CloudStorageFileSystemProvider} when gcloud is not configured.
@@ -66,8 +39,8 @@ public class CloudStorageLateInitializationTest {
6639

6740
@Rule public final ExpectedException thrown = ExpectedException.none();
6841

69-
@Before
70-
public void before() {
42+
@BeforeClass
43+
public static void beforeClass() {
7144
if (System.getenv().containsKey("GOOGLE_APPLICATION_CREDENTIALS")) {
7245
throw new RuntimeException("CloudStorageLateInitializationTest can only be run if gcloud is not configured. This means no GOOGLE_APPLICATION_CREDENTIALS environment variable.");
7346
}
@@ -93,7 +66,7 @@ public void pathFailsIfNoEnvVariable() throws IOException {
9366
// *and* we don't have a ~/.config/gcloud/properties file (or %APPDATA%/gcloud in Windows)
9467
// and we don't have a ~/.config/gcloud/active-config.
9568
// (since we're also not providing credentials in any other way)
96-
Path path = Paths.get(URI.create("gs://bucket/wat"));
69+
Paths.get(URI.create("gs://bucket/wat"));
9770
}
9871

9972
@Test

0 commit comments

Comments
 (0)