本文整理汇总了Java中com.alibaba.dubbo.common.utils.LogUtil.stop方法的典型用法代码示例。如果您正苦于以下问题:Java LogUtil.stop方法的具体用法?Java LogUtil.stop怎么用?Java LogUtil.stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alibaba.dubbo.common.utils.LogUtil
的用法示例。
在下文中一共展示了LogUtil.stop方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testNoInvoke
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test()
public void testNoInvoke() {
dic = EasyMock.createMock(Directory.class);
EasyMock.expect(dic.getUrl()).andReturn(url).anyTimes();
EasyMock.expect(dic.list(invocation)).andReturn(null).anyTimes();
EasyMock.expect(dic.getInterface()).andReturn(DemoService.class).anyTimes();
invocation.setMethodName("method1");
EasyMock.replay(dic);
resetInvokerToNoException();
FailsafeClusterInvoker<DemoService> invoker = new FailsafeClusterInvoker<DemoService>(dic);
LogUtil.start();
invoker.invoke(invocation);
assertTrue(LogUtil.findMessage("No provider") > 0);
LogUtil.stop();
}
示例2: test_getAdaptiveExtension_inject
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test
public void test_getAdaptiveExtension_inject() throws Exception {
LogUtil.start();
Ext6 ext = ExtensionLoader.getExtensionLoader(Ext6.class).getAdaptiveExtension();
URL url = new URL("p1", "1.2.3.4", 1010, "path1");
url = url.addParameters("ext6", "impl1");
assertEquals("Ext6Impl1-echo-Ext1Impl1-echo", ext.echo(url, "ha"));
Assert.assertTrue("can not find error.", LogUtil.checkNoError());
LogUtil.stop();
url = url.addParameters("simple.ext", "impl2");
assertEquals("Ext6Impl1-echo-Ext1Impl2-echo", ext.echo(url, "ha"));
}
示例3: testNoInvoke
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test()
public void testNoInvoke() {
dic = EasyMock.createMock(Directory.class);
EasyMock.expect(dic.getUrl()).andReturn(url).anyTimes();
EasyMock.expect(dic.list(invocation)).andReturn(null).anyTimes();
EasyMock.expect(dic.getInterface()).andReturn(DemoService.class).anyTimes();
invocation.setMethodName("method1");
EasyMock.replay(dic);
resetInvokerToNoException();
FailsafeClusterInvoker<DemoService> invoker = new FailsafeClusterInvoker<DemoService>(dic);
LogUtil.start();
invoker.invoke(invocation);
assertTrue(LogUtil.findMessage("No provider") > 0);
LogUtil.stop();
}
示例4: test_getAdaptiveExtension_inject
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test
public void test_getAdaptiveExtension_inject() throws Exception {
LogUtil.start();
Ext6 ext = ExtensionLoader.getExtensionLoader(Ext6.class).getAdaptiveExtension();
URL url = new URL("p1", "1.2.3.4", 1010, "path1");
url = url.addParameters("ext6", "impl1");
assertEquals("Ext6Impl1-echo-Ext1Impl1-echo", ext.echo(url, "ha"));
Assert.assertTrue("can not find error.", LogUtil.checkNoError());
LogUtil.stop();
url = url.addParameters("simple.ext", "impl2");
assertEquals("Ext6Impl1-echo-Ext1Impl2-echo", ext.echo(url, "ha"));
}
示例5: testDeprecatedFilter
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test
public void testDeprecatedFilter() {
URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&echo." + Constants.DEPRECATED_KEY + "=true");
LogUtil.start();
deprecatedFilter.invoke(new MyInvoker<DemoService>(url), new MockInvocation());
assertEquals(1,
LogUtil.findMessage("The service method com.alibaba.dubbo.rpc.support.DemoService.echo(String) is DEPRECATED"));
LogUtil.stop();
}
示例6: testInvokeException
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test
public void testInvokeException() {
Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(null);
Invocation invocation = new MockInvocation();
LogUtil.start();
accessLogFilter.invoke(invoker, invocation);
assertEquals(1, LogUtil.findMessage("Exception in AcessLogFilter of service"));
LogUtil.stop();
}
示例7: testNotified_Normal_withRouters
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
/**
* 测试推送只有router的情况
*/
@Test
public void testNotified_Normal_withRouters() {
LogUtil.start();
RegistryDirectory registryDirectory = getRegistryDirectory();
test_Notified1invokers(registryDirectory);
test_Notified_only_routers(registryDirectory);
Assert.assertEquals(true, registryDirectory.isAvailable());
Assert.assertTrue("notify no invoker urls ,should not error", LogUtil.checkNoError());
LogUtil.stop();
test_Notified2invokers(registryDirectory);
}
示例8: testNotified_Normal_withRouters
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
/**
* 测试推送只有router的情况
*/
@Test
public void testNotified_Normal_withRouters() {
LogUtil.start();
RegistryDirectory registryDirectory = getRegistryDirectory();
test_Notified1invokers(registryDirectory);
test_Notified_only_routers(registryDirectory);
Assert.assertEquals(true, registryDirectory.isAvailable());
Assert.assertTrue("notify no invoker urls ,should not error", LogUtil.checkNoError());
LogUtil.stop();
test_Notified2invokers(registryDirectory);
}
示例9: testDeprecatedFilter
import com.alibaba.dubbo.common.utils.LogUtil; //导入方法依赖的package包/类
@Test
public void testDeprecatedFilter() {
URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&echo." + Constants.DEPRECATED_KEY + "=true");
LogUtil.start();
deprecatedFilter.invoke(new MyInvoker<DemoService>(url), new MockInvocation());
assertEquals(1,
LogUtil.findMessage("The service method com.alibaba.dubbo.rpc.support.DemoService.echo(String) is DEPRECATED"));
LogUtil.stop();
}