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

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


The following commit(s) were added to refs/heads/5.3.2-release by this push:
     new eefc3079f7b remove PluginJarLoaderTest (#24841) (#24842)
eefc3079f7b is described below

commit eefc3079f7b149dbf42da9226df6535aad199164
Author: Raigor <[email protected]>
AuthorDate: Sun Mar 26 21:47:50 2023 +0800

    remove PluginJarLoaderTest (#24841) (#24842)
    
    (cherry picked from commit 7a7b9118535348835001404176b197899f632571)
    
    Co-authored-by: jiangML <[email protected]>
---
 .../agent/core/plugin/jar/PluginJarLoaderTest.java |  50 ---------------------
 .../src/test/resources/plugins/test-plugin.jar     | Bin 22 -> 0 bytes
 2 files changed, 50 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 198ab0f7566..00000000000
--- 
a/agent/core/src/test/java/org/apache/shardingsphere/agent/core/plugin/jar/PluginJarLoaderTest.java
+++ /dev/null
@@ -1,50 +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.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;
-
-public class PluginJarLoaderTest {
-    
-    @Test
-    public 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

Reply via email to