Skip to content

Commit

Permalink
fix spring boot test
Browse files Browse the repository at this point in the history
  • Loading branch information
ipipman committed Apr 21, 2024
1 parent 63765e9 commit 95aec93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @Date 2024/3/26 22:22
*/
@SpringBootTest(classes = {RpcmanDemoConsumerApplication.class},
properties = {"rpcman.zk.zkServer=localhost:2183"})
properties = {"rpcman.zk.zkServer=localhost:2183", "rpcman.zk.enabled=true", "registry-ipman.enabled=false"})
public class RpcManDemoConsumerApplicationTests {

static ApplicationContext context1;
Expand Down Expand Up @@ -61,10 +61,12 @@ static void init() {
"--logging.level.cn.ipman=debug",
"--rpcman.app.useNetty=true",
"--rpcman.zk.zkServer=localhost:2183",
"--rpcman.zk.enabled=true",
"--rpcman.provider.metas.dc=bj",
"--rpcman.provider.metas.gray=false",
"--rpcman.provider.metas.unit=B002",
"--rpcman.provider.metas.tc=300"
"--rpcman.provider.metas.tc=300",
"--registry-ipman.enabled=false"
);

System.out.println(" ================================ ");
Expand All @@ -76,10 +78,12 @@ static void init() {
"--logging.level.cn.ipman=debug",
"--rpcman.app.useNetty=true",
"--rpcman.zk.zkServer=localhost:2183",
"--rpcman.zk.enabled=true",
"--rpcman.provider.metas.dc=bj",
"--rpcman.provider.metas.gray=false",
"--rpcman.provider.metas.unit=B002",
"--rpcman.provider.metas.tc=300"
"--rpcman.provider.metas.tc=300",
"--registry-ipman.enabled=false"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
@SpringBootTest(classes = {RpcmanDemoProviderApplication.class},
properties = {"rpcman.zk.enabled=true", "registry-ipman.enabled=false"})
@ExtendWith(MockApolloExtension.class)
class RpcmanDemoProviderApplicationTests {

Expand Down

0 comments on commit 95aec93

Please sign in to comment.