mercyblitz closed pull request #73: fix test code compile
URL: https://github.com/apache/incubator-dubbo-spring-boot-project/pull/73
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
index 8518607d..3b783ac7 100644
--- 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
+++ 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnMultipleConfigTest.java
@@ -22,10 +22,9 @@
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.IntegrationTest;
-import org.springframework.boot.test.SpringApplicationConfiguration;
 import org.springframework.context.ApplicationContext;
 import org.springframework.core.env.Environment;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -56,10 +55,9 @@
                 "dubbo.scan.basePackages=com.alibaba.boot.dubbo, 
com.alibaba.boot.dubbo.condition"
         }
 )
-@SpringApplicationConfiguration(
+@ContextConfiguration(
         classes = {DubboAutoConfiguration.class}
 )
-@IntegrationTest
 public class DubboAutoConfigurationOnMultipleConfigTest {
 
     @Autowired
diff --git 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
index 7dee0412..aab2b833 100644
--- 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
+++ 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/autoconfigure/DubboAutoConfigurationOnSingleConfigTest.java
@@ -23,10 +23,9 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.IntegrationTest;
-import org.springframework.boot.test.SpringApplicationConfiguration;
 import org.springframework.context.ApplicationContext;
 import org.springframework.core.env.Environment;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -49,10 +48,9 @@
                 "dubbo.consumer.client=netty"
         }
 )
-@SpringApplicationConfiguration(
+@ContextConfiguration(
         classes = {DubboAutoConfiguration.class}
 )
-@IntegrationTest
 public class DubboAutoConfigurationOnSingleConfigTest {
 
     @Autowired
diff --git 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
index 94ebb51b..feb4e6fd 100644
--- 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
+++ 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerDisableTest.java
@@ -21,8 +21,7 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.springframework.boot.test.IntegrationTest;
-import org.springframework.boot.test.SpringApplicationConfiguration;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -43,10 +42,9 @@
                 "dubbo.module.name = dubbo-demo-module",
         }
 )
-@SpringApplicationConfiguration(
+@ContextConfiguration(
         classes = {OverrideDubboConfigApplicationListener.class}
 )
-@IntegrationTest
 public class OverrideDubboConfigApplicationListenerDisableTest {
 
     @BeforeClass
diff --git 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java
 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java
index e3875c02..6836bdd1 100644
--- 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java
+++ 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/OverrideDubboConfigApplicationListenerTest.java
@@ -21,8 +21,7 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.springframework.boot.test.IntegrationTest;
-import org.springframework.boot.test.SpringApplicationConfiguration;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -43,10 +42,9 @@
                 "dubbo.registry.address = zookeeper://192.168.99.100:32770"
         }
 )
-@SpringApplicationConfiguration(
+@ContextConfiguration(
         classes = {OverrideDubboConfigApplicationListener.class}
 )
-@IntegrationTest
 public class OverrideDubboConfigApplicationListenerTest {
 
     @BeforeClass
diff --git 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java
 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java
index 27a167b2..d5ff340f 100644
--- 
a/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java
+++ 
b/dubbo-spring-boot-autoconfigure/src/test/java/com/alibaba/boot/dubbo/context/event/WelcomeLogoApplicationListenerTest.java
@@ -20,8 +20,7 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.IntegrationTest;
-import org.springframework.boot.test.SpringApplicationConfiguration;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 /**
@@ -32,10 +31,7 @@
  * @since 1.0.0
  */
 @RunWith(SpringJUnit4ClassRunner.class)
-@SpringApplicationConfiguration(
-        classes = {WelcomeLogoApplicationListener.class}
-)
-@IntegrationTest
+@ContextConfiguration(classes = {WelcomeLogoApplicationListener.class})
 public class WelcomeLogoApplicationListenerTest {
 
     @Autowired


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to