You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/03/12 13:46:58 UTC
[dubbo-spring-boot-project] branch 2.7.9-release updated: add test
suite to make order
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 2.7.9-release
in repository https://gitbox.apache.org/repos/asf/dubbo-spring-boot-project.git
The following commit(s) were added to refs/heads/2.7.9-release by this push:
new 88cc365 add test suite to make order
88cc365 is described below
commit 88cc365674fc211551c537a00fbf9fa4df15d110
Author: Albumen <jh...@gmail.com>
AuthorDate: Fri Mar 12 21:38:40 2021 +0800
add test suite to make order
---
.../org/apache/dubbo/spring/boot/TestSuite.java | 53 ++++++++++++++++++++++
.../CompatibleDubboAutoConfigurationTest.java | 3 +-
...OverrideDubboConfigApplicationListenerTest.java | 3 +-
3 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/TestSuite.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/TestSuite.java
new file mode 100644
index 0000000..f9106b9
--- /dev/null
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/TestSuite.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.spring.boot;
+
+import org.apache.dubbo.spring.boot.autoconfigure.CompatibleDubboAutoConfigurationTest;
+import org.apache.dubbo.spring.boot.autoconfigure.CompatibleDubboAutoConfigurationTestWithoutProperties;
+import org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfigurationOnMultipleConfigTest;
+import org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfigurationOnSingleConfigTest;
+import org.apache.dubbo.spring.boot.autoconfigure.RelaxedDubboConfigBinderTest;
+import org.apache.dubbo.spring.boot.context.event.AwaitingNonWebApplicationListenerTest;
+import org.apache.dubbo.spring.boot.context.event.DubboConfigBeanDefinitionConflictApplicationListenerTest;
+import org.apache.dubbo.spring.boot.context.event.OverrideDubboConfigApplicationListenerDisableTest;
+import org.apache.dubbo.spring.boot.context.event.OverrideDubboConfigApplicationListenerTest;
+import org.apache.dubbo.spring.boot.context.event.WelcomeLogoApplicationListenerTest;
+import org.apache.dubbo.spring.boot.env.DubboDefaultPropertiesEnvironmentPostProcessorTest;
+import org.apache.dubbo.spring.boot.util.DubboUtilsTest;
+import org.apache.dubbo.spring.boot.util.EnvironmentUtilsTest;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ CompatibleDubboAutoConfigurationTest.class,
+ CompatibleDubboAutoConfigurationTestWithoutProperties.class,
+ DubboAutoConfigurationOnMultipleConfigTest.class,
+ DubboAutoConfigurationOnSingleConfigTest.class,
+ RelaxedDubboConfigBinderTest.class,
+ AwaitingNonWebApplicationListenerTest.class,
+ DubboConfigBeanDefinitionConflictApplicationListenerTest.class,
+ OverrideDubboConfigApplicationListenerDisableTest.class,
+ OverrideDubboConfigApplicationListenerTest.class,
+ WelcomeLogoApplicationListenerTest.class,
+ DubboDefaultPropertiesEnvironmentPostProcessorTest.class,
+ DubboUtilsTest.class,
+ EnvironmentUtilsTest.class
+})
+public class TestSuite {
+}
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/CompatibleDubboAutoConfigurationTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTest.java
similarity index 95%
rename from dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/CompatibleDubboAutoConfigurationTest.java
rename to dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTest.java
index f0e5b74..17dfe93 100644
--- a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/CompatibleDubboAutoConfigurationTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/autoconfigure/CompatibleDubboAutoConfigurationTest.java
@@ -14,11 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.spring.boot;
+package org.apache.dubbo.spring.boot.autoconfigure;
import org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor;
import org.apache.dubbo.config.spring.beans.factory.annotation.ServiceClassPostProcessor;
-import org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration;
import org.junit.Assert;
import org.junit.Test;
diff --git a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java
index 87ee1c3..eb1e0aa 100644
--- a/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java
+++ b/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/context/event/OverrideDubboConfigApplicationListenerTest.java
@@ -25,6 +25,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
@@ -47,6 +48,7 @@ import java.util.Properties;
@SpringBootTest(
classes = {OverrideDubboConfigApplicationListener.class}
)
+@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
public class OverrideDubboConfigApplicationListenerTest {
@BeforeClass
@@ -62,7 +64,6 @@ public class OverrideDubboConfigApplicationListenerTest {
@Test
public void testOnApplicationEvent() {
-
Properties properties = ConfigUtils.getProperties();
Assert.assertEquals("dubbo-demo-application", properties.get("dubbo.application.name"));