Created
October 14, 2010 14:56
-
-
Save shin1ogawa/626306 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method; | |
import org.slim3.tester.AppEngineTester; | |
import org.slim3.util.AppEngineUtil; | |
import com.google.apphosting.api.ApiProxy; | |
public class CustomizedAppEngineTester extends AppEngineTester { | |
@Override | |
public void tearDown() throws Exception { | |
ClassLoader loader = loadLibraries(); | |
Class<?> apiProxyLocalImplClass = loader.loadClass(API_PROXY_LOCAL_IMPL_CLASS_NAME); | |
Method stopMethod = apiProxyLocalImplClass.getMethod("stop"); | |
stopMethod.setAccessible(true); | |
stopMethod.invoke(apiProxyLocalImpl); | |
ApiProxy.setDelegate(originalDelegate); | |
if (!AppEngineUtil.isProduction()) { | |
ApiProxy.setEnvironmentForCurrentThread(originalEnvironment); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment