Skip to content
Permalink
Browse files
reset after class
  • Loading branch information
EarthChen committed Sep 15, 2021
1 parent 53cc1a2 commit d2c89f5ad86df25c1660ec0d7300cd33354a3bf0
Showing 5 changed files with 33 additions and 1 deletion.
@@ -25,7 +25,9 @@ services:
basedir: .
tests:
# tri-->tri
- "org.apache.dubbo.sample.tri/Tri*Test.class"
- "org.apache.dubbo.sample.tri/TriPbConsumerTest.class"
- "org.apache.dubbo.sample.tri/TriWrapConsumerTest.class"
- "org.apache.dubbo.sample.tri/TriGenericTest.class"
# grpc-->tri
- "org.apache.dubbo.sample.tri/grpc/Grpc*Test.class"
# tri-->grpc
@@ -1,11 +1,13 @@
package org.apache.dubbo.sample.tri;

import org.apache.dubbo.common.stream.StreamObserver;
import org.apache.dubbo.config.bootstrap.DubboBootstrap;
import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.sample.tri.helper.StdoutStreamObserver;
import org.apache.dubbo.sample.tri.service.PbGreeterManual;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Test;

@@ -123,4 +125,11 @@ public void methodNotFound() {
Assert.assertTrue(e.getMessage().contains("not found"));
}
}

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


}
@@ -1,10 +1,12 @@
package org.apache.dubbo.sample.tri;

import org.apache.dubbo.common.stream.StreamObserver;
import org.apache.dubbo.config.bootstrap.DubboBootstrap;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.sample.tri.helper.StdoutStreamObserver;
import org.apache.dubbo.sample.tri.service.WrapGreeter;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Test;

@@ -119,4 +121,10 @@ public void sayHelloLong() {
Assert.assertEquals(len, response.length());
}
}


@AfterClass
public static void alterTest() {
DubboBootstrap.reset();
}
}
@@ -8,6 +8,7 @@
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.service.GenericService;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -67,4 +68,10 @@ public void sayHelloLong() {
final String resp = (String) generic.$invoke("sayHelloLong", new String[]{int.class.getName()}, new Object[]{len});
Assert.assertEquals(len, resp.length());
}


@AfterClass
public static void alterTest() {
DubboBootstrap.reset();
}
}
@@ -10,6 +10,7 @@
import org.apache.dubbo.sample.tri.helper.StdoutStreamObserver;
import org.apache.dubbo.sample.tri.service.WrapGreeter;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -144,4 +145,9 @@ public void sayHelloLong() {
Assert.assertEquals(len, response.length());
}
}

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

0 comments on commit d2c89f5

Please sign in to comment.