You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2023/03/26 13:36:45 UTC

[shardingsphere] branch master updated: remove PluginJarLoaderTest (#24841)

This is an automated email from the ASF dual-hosted git repository.

jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a7b9118535 remove PluginJarLoaderTest (#24841)
7a7b9118535 is described below

commit 7a7b9118535348835001404176b197899f632571
Author: jiangML <10...@qq.com>
AuthorDate: Sun Mar 26 21:36:36 2023 +0800

    remove PluginJarLoaderTest (#24841)
---
 .../agent/core/plugin/jar/PluginJarLoaderTest.java |  46 ---------------------
 .../src/test/resources/plugins/test-plugin.jar     | Bin 22 -> 0 bytes
 2 files changed, 46 deletions(-)

diff --git a/agent/core/src/test/java/org/apache/shardingsphere/agent/core/plugin/jar/PluginJarLoaderTest.java b/agent/core/src/test/java/org/apache/shardingsphere/agent/core/plugin/jar/PluginJarLoaderTest.java
deleted file mode 100644
index bc9b5604ed1..00000000000
--- a/agent/core/src/test/java/org/apache/shardingsphere/agent/core/plugin/jar/PluginJarLoaderTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-
-package org.apache.shardingsphere.agent.core.plugin.jar;
-
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.Collection;
-import java.util.Objects;
-import java.util.jar.JarFile;
-
-import static org.hamcrest.CoreMatchers.endsWith;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-class PluginJarLoaderTest {
-    
-    @Test
-    void assertLoad() throws IOException {
-        Collection<JarFile> jarFiles = PluginJarLoader.load(new File(getResourceURL()));
-        assertThat(jarFiles.size(), is(1));
-        assertThat(jarFiles.iterator().next().getName(), endsWith("test-plugin.jar"));
-    }
-    
-    private String getResourceURL() throws UnsupportedEncodingException {
-        return URLDecoder.decode(Objects.requireNonNull(PluginJarLoader.class.getClassLoader().getResource("")).getFile(), "UTF8");
-    }
-}
diff --git a/agent/core/src/test/resources/plugins/test-plugin.jar b/agent/core/src/test/resources/plugins/test-plugin.jar
deleted file mode 100644
index 15cb0ecb3e2..00000000000
Binary files a/agent/core/src/test/resources/plugins/test-plugin.jar and /dev/null differ