Skip to content
Permalink
Browse files
add DubboBootstrap.reset() for dubbo-samples-version (#384)
  • Loading branch information
zrlw committed Nov 9, 2021
1 parent 57abff3 commit 019d56bead135fcb23fb410110c27924440e3352
Showing 3 changed files with 32 additions and 3 deletions.
@@ -17,9 +17,11 @@

package org.apache.dubbo.samples.version;

import org.apache.dubbo.config.bootstrap.DubboBootstrap;
import org.apache.dubbo.samples.version.api.VersionService;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +36,16 @@ public class VersionService1IT {
@Autowired
private VersionService service;

@BeforeClass
public static void setUp() {
DubboBootstrap.reset();
}

@AfterClass
public static void tearDown() {
DubboBootstrap.reset();
}

@Test
public void test() throws Exception {
Assert.assertEquals("hello, dubbo", service.sayHello("dubbo"));
@@ -17,9 +17,11 @@

package org.apache.dubbo.samples.version;

import org.apache.dubbo.config.bootstrap.DubboBootstrap;
import org.apache.dubbo.samples.version.api.VersionService;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +36,16 @@ public class VersionService2IT {
@Autowired
private VersionService service;

@BeforeClass
public static void setUp() {
DubboBootstrap.reset();
}

@AfterClass
public static void tearDown() {
DubboBootstrap.reset();
}

@Test
public void test() throws Exception {
Assert.assertEquals("hello2, dubbo", service.sayHello("dubbo"));
@@ -19,7 +19,7 @@

import org.apache.dubbo.config.bootstrap.DubboBootstrap;
import org.apache.dubbo.samples.version.api.VersionService;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -42,6 +42,11 @@ public static void setUp() {
MyNettyTransporter.reset();
}

@AfterClass
public static void tearDown() {
DubboBootstrap.reset();
}

@Test
public void test() throws Exception {
for (int i = 0; i < 10; i++) {

0 comments on commit 019d56b

Please sign in to comment.