Skip to content

Commit

Permalink
add test suite to make order
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Mar 12, 2021
1 parent 99d3d60 commit 88cc365
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
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;

Expand All @@ -47,6 +48,7 @@
@SpringBootTest(
classes = {OverrideDubboConfigApplicationListener.class}
)
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
public class OverrideDubboConfigApplicationListenerTest {

@BeforeClass
Expand All @@ -62,7 +64,6 @@ public static void destroy() {

@Test
public void testOnApplicationEvent() {

Properties properties = ConfigUtils.getProperties();

Assert.assertEquals("dubbo-demo-application", properties.get("dubbo.application.name"));
Expand Down

0 comments on commit 88cc365

Please sign in to comment.