Skip to content

Commit

Permalink
upgrade spring boot to 2.6.6 and spring cloud to 2021.0.1 (#4295)
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam authored Apr 4, 2022
1 parent 039801a commit db6a439
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 44 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ Apollo 2.0.0
* [Refactor the soft delete design](https://github.com/apolloconfig/apollo/pull/3866)
* [Fix the potential data inconsistency issue](https://github.com/apolloconfig/apollo/pull/4256)
* [Fix the deleted items display issue in text mode](https://github.com/apolloconfig/apollo/pull/4279)
* [Upgrade spring boot to 2.6.6 and spring cloud to 2021.0.1](https://github.com/apolloconfig/apollo/pull/4295)
------------------
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/8?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ spring.h2.console.enabled = true
spring.h2.console.settings.web-allow-others=true
spring.main.allow-bean-definition-overriding=true
spring.cloud.consul.enabled=false
spring.cloud.zookeeper.enabled=false
spring.cloud.zookeeper.enabled=false
spring.jpa.defer-datasource-initialization=true
3 changes: 2 additions & 1 deletion apollo-biz/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ spring.jpa.properties.hibernate.metadata_builder_contributor=com.ctrip.framework
spring.h2.console.enabled = true
spring.h2.console.settings.web-allow-others=true
spring.cloud.consul.enabled=false
spring.cloud.zookeeper.enabled=false
spring.cloud.zookeeper.enabled=false
spring.jpa.defer-datasource-initialization=true
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package com.ctrip.framework.apollo.internals;

import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand All @@ -36,7 +38,6 @@
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.mockito.Matchers;

/**
* @author wxq
Expand Down Expand Up @@ -71,7 +72,7 @@ public void onChange(ConfigChangeEvent changeEvent) {
// wait a minute for invoking
Thread.sleep(100);

verify(configChangeListener, times(0)).onChange(Matchers.<ConfigChangeEvent>any());
verify(configChangeListener, times(0)).onChange(any());
}

@Test
Expand Down Expand Up @@ -115,8 +116,8 @@ public void onChange(ConfigChangeEvent changeEvent) {

assertEquals(2, invokeCount.get());

verify(configChangeListener1, times(1)).onChange(Matchers.eq(configChangeEvent));
verify(configChangeListener2, times(1)).onChange(Matchers.eq(configChangeEvent));
verify(configChangeListener1, times(1)).onChange(eq(configChangeEvent));
verify(configChangeListener2, times(1)).onChange(eq(configChangeEvent));
}

@Test
Expand Down Expand Up @@ -159,8 +160,8 @@ public void onChange(ConfigChangeEvent changeEvent) {

assertEquals(2, invokeCount.get());

verify(configChangeListener1, times(1)).onChange(Matchers.<ConfigChangeEvent>any());
verify(configChangeListener2, times(1)).onChange(Matchers.<ConfigChangeEvent>any());
verify(configChangeListener1, times(1)).onChange(any());
verify(configChangeListener2, times(1)).onChange(any());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.ctrip.framework.apollo.ConfigChangeListener;
import com.ctrip.framework.apollo.enums.ConfigSourceType;
import com.ctrip.framework.apollo.enums.PropertyChangeType;
import com.ctrip.framework.apollo.internals.AbstractConfig;
import com.ctrip.framework.apollo.model.ConfigChange;
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.google.common.collect.Sets;
Expand All @@ -35,7 +34,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.Test;
import org.mockito.Matchers;

import static org.mockito.Mockito.*;

Expand Down Expand Up @@ -78,7 +76,7 @@ public void onChange(ConfigChangeEvent changeEvent) {

onChangeFuture.get(500, TimeUnit.MILLISECONDS);

verify(configChangeListener, atLeastOnce()).onChange(Matchers.<ConfigChangeEvent>any());
verify(configChangeListener, atLeastOnce()).onChange(any());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.ctrip.framework.apollo.internals;

import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

@RunWith(MockitoJUnitRunner.class)
public class PropertiesCompatibleFileConfigRepositoryTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import org.mockito.stubbing.Answer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -55,7 +55,7 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;
import org.springframework.test.util.ReflectionTestUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.doAnswer;
Expand Down Expand Up @@ -65,7 +65,7 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigChangeListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

@RunWith(MockitoJUnitRunner.class)
public class TxtConfigFileTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;

@RunWith(MockitoJUnitRunner.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

import java.util.List;

import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anySetOf;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anySet;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -405,7 +404,7 @@ public void testApolloConfigChangeListenerWithInterestedKeyPrefixes_fire()

verify(simpleConfig, atLeastOnce())
.addChangeListener(any(ConfigChangeListener.class), Mockito.nullable(Set.class),
anySetOf(String.class));
anySet());

Properties properties = new Properties();
properties.put("logging.level.com", "debug");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.ctrip.framework.apollo.spring;

import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
*/
package com.ctrip.framework.apollo.spring;

import static java.util.Arrays.asList;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anySetOf;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.ctrip.framework.apollo.spring;

import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand All @@ -39,7 +39,7 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;
import org.springframework.core.env.PropertySource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
Expand All @@ -37,7 +37,7 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;

@RunWith(MockitoJUnitRunner.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spring.h2.console.settings.web-allow-others=true
spring.cloud.consul.enabled=false
spring.cloud.zookeeper.enabled=false
spring.main.allow-bean-definition-overriding=true
spring.jpa.defer-datasource-initialization=true

# for ReleaseMessageScanner test
apollo.message-scan.interval=100
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<revision>2.0.0-SNAPSHOT</revision>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-boot.version>2.4.12</spring-boot.version>
<spring-cloud.version>2020.0.4</spring-cloud.version>
<spring-boot.version>2.6.6</spring-boot.version>
<spring-cloud.version>2021.0.1</spring-cloud.version>
<jaxb.version>2.3.1</jaxb.version>
<javax.activation.version>1.1.1</javax.activation.version>
<javax.mail.version>1.6.2</javax.mail.version>
Expand Down

0 comments on commit db6a439

Please sign in to comment.