当前位置: 首页>>代码示例>>Java>>正文


Java LogUtil.stop方法代码示例

本文整理汇总了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();
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:20,代码来源:FailSafeClusterInvokerTest.java

示例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"));
    
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:18,代码来源:ExtensionLoader_Adaptive_Test.java

示例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();
}
 
开发者ID:l1325169021,项目名称:github-test,代码行数:20,代码来源:FailSafeClusterInvokerTest.java

示例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"));

}
 
开发者ID:hufeng,项目名称:dubbo2.js,代码行数:18,代码来源:ExtensionLoader_Adaptive_Test.java

示例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();
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:10,代码来源:DeprecatedFilterTest.java

示例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();
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:10,代码来源:AccessLogFilterTest.java

示例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);
    
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:16,代码来源:RegistryDirectoryTest.java

示例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);

}
 
开发者ID:l1325169021,项目名称:github-test,代码行数:16,代码来源:RegistryDirectoryTest.java

示例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();
}
 
开发者ID:hufeng,项目名称:dubbo2.js,代码行数:10,代码来源:DeprecatedFilterTest.java


注:本文中的com.alibaba.dubbo.common.utils.LogUtil.stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。