From 82de03eaf042ef23e750e3c2486436c779cbf089 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 27 Jan 2021 11:35:13 -0800 Subject: [PATCH] debug: test provider config is loaded before tests run --- google-cloud-nio/pom.xml | 5 +++++ .../java.nio.file.spi.FileSystemProvider | 16 ---------------- .../contrib/nio/CloudStorageOptionsTest.java | 3 +++ 3 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 482ba7a0a..14214e390 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -114,6 +114,11 @@ auto-value 1.7.4 + + com.google.auto.service + auto-service + 1.0-rc7 + diff --git a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider deleted file mode 100644 index 932276026..000000000 --- a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider diff --git a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java index c6ce31ef6..98db18ded 100644 --- a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java +++ b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java @@ -24,6 +24,8 @@ import com.google.common.testing.NullPointerTester; import java.io.IOException; import java.net.URI; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -39,6 +41,7 @@ public class CloudStorageOptionsTest { @Before public void before() { CloudStorageFileSystemProvider.setStorageOptions(LocalStorageHelper.getOptions()); + CloudStorageFileSystem mockFs = CloudStorageFileSystem.forBucket("bucket"); } @Test