You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jc...@apache.org on 2016/05/18 16:03:59 UTC
incubator-geode git commit: GEODE-1133 SeparateClassloaderTestRunner
has to be re-implemented
Repository: incubator-geode
Updated Branches:
refs/heads/develop 00c794b4c -> b1ff33dd6
GEODE-1133 SeparateClassloaderTestRunner has to be re-implemented
Remove SeparateClassloaderTestRunner since it is not used
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b1ff33dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b1ff33dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b1ff33dd
Branch: refs/heads/develop
Commit: b1ff33dd6e5a095bf3b0ca4f3791f2e651676db8
Parents: 00c794b
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Wed May 18 09:02:26 2016 -0700
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Wed May 18 09:02:26 2016 -0700
----------------------------------------------------------------------
.../junit/SeparateClassloaderTestRunner.java | 56 --------------------
1 file changed, 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b1ff33dd/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java
deleted file mode 100644
index 4337f5a..0000000
--- a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/junit/SeparateClassloaderTestRunner.java
+++ /dev/null
@@ -1,56 +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 com.gemstone.gemfire.modules.session.junit;
-
-import org.junit.runners.BlockJUnit4ClassRunner;
-import org.junit.runners.model.InitializationError;
-
-import java.net.URLClassLoader;
-
-/**
- * @author StackOverflow
- */
-public class SeparateClassloaderTestRunner extends BlockJUnit4ClassRunner {
-
- public SeparateClassloaderTestRunner(Class<?> clazz) throws InitializationError {
- super(getFromTestClassloader(clazz));
- }
-
- private static Class<?> getFromTestClassloader(Class<?> clazz) throws InitializationError {
- try {
- ClassLoader testClassLoader = new TestClassLoader();
- return Class.forName(clazz.getName(), true, testClassLoader);
- } catch (ClassNotFoundException e) {
- throw new InitializationError(e);
- }
- }
-
- public static class TestClassLoader extends URLClassLoader {
- public TestClassLoader() {
- super(((URLClassLoader)getSystemClassLoader()).getURLs());
- }
-
- @Override
- public Class<?> loadClass(String name) throws ClassNotFoundException {
- if (name.startsWith("com.gemstone.gemfire.modules.session.")) {
- return super.findClass(name);
- }
- return super.loadClass(name);
- }
- }
-}