"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java" between
spring-boot-2.7.3.tar.gz and spring-boot-2.7.4.tar.gz

About: Spring Boot helps to create Spring-powered, production-grade applications and services.

HazelcastAutoConfigurationClientTests.java  (spring-boot-2.7.3):HazelcastAutoConfigurationClientTests.java  (spring-boot-2.7.4)
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* https://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
skipping to change at line 85 skipping to change at line 85
@Test @Test
void systemPropertyWithYaml() { void systemPropertyWithYaml() {
this.contextRunner this.contextRunner
.withSystemProperties(HazelcastClientConfiguratio n.CONFIG_SYSTEM_PROPERTY .withSystemProperties(HazelcastClientConfiguratio n.CONFIG_SYSTEM_PROPERTY
+ "=classpath:org/springframework /boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml") + "=classpath:org/springframework /boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml")
.run(assertSpecificHazelcastClient("explicit-yaml ")); .run(assertSpecificHazelcastClient("explicit-yaml "));
} }
@Test @Test
void systemPropertyWithYml() {
this.contextRunner
.withSystemProperties(HazelcastClientConfiguratio
n.CONFIG_SYSTEM_PROPERTY
+ "=classpath:org/springframework
/boot/autoconfigure/hazelcast/hazelcast-client-specific.yml")
.run(assertSpecificHazelcastClient("explicit-yml"
));
}
@Test
void explicitConfigFileWithXml() { void explicitConfigFileWithXml() {
this.contextRunner.withPropertyValues("spring.hazelcast.config=or g/springframework/boot/autoconfigure/" this.contextRunner.withPropertyValues("spring.hazelcast.config=or g/springframework/boot/autoconfigure/"
+ "hazelcast/hazelcast-client-specific.xml").run( assertSpecificHazelcastClient("explicit-xml")); + "hazelcast/hazelcast-client-specific.xml").run( assertSpecificHazelcastClient("explicit-xml"));
} }
@Test @Test
void explicitConfigFileWithYaml() { void explicitConfigFileWithYaml() {
this.contextRunner this.contextRunner
.withPropertyValues("spring.hazelcast.config=org/ springframework/boot/autoconfigure/" .withPropertyValues("spring.hazelcast.config=org/ springframework/boot/autoconfigure/"
+ "hazelcast/hazelcast-client-spe cific.yaml") + "hazelcast/hazelcast-client-spe cific.yaml")
.run(assertSpecificHazelcastClient("explicit-yaml ")); .run(assertSpecificHazelcastClient("explicit-yaml "));
} }
@Test @Test
void explicitConfigFileWithYml() {
this.contextRunner.withPropertyValues("spring.hazelcast.config=or
g/springframework/boot/autoconfigure/"
+ "hazelcast/hazelcast-client-specific.yml").run(
assertSpecificHazelcastClient("explicit-yml"));
}
@Test
void explicitConfigUrlWithXml() { void explicitConfigUrlWithXml() {
this.contextRunner this.contextRunner
.withPropertyValues("spring.hazelcast.config=clas spath:org/springframework/" .withPropertyValues("spring.hazelcast.config=clas spath:org/springframework/"
+ "boot/autoconfigure/hazelcast/h azelcast-client-specific.xml") + "boot/autoconfigure/hazelcast/h azelcast-client-specific.xml")
.run(assertSpecificHazelcastClient("explicit-xml" )); .run(assertSpecificHazelcastClient("explicit-xml" ));
} }
@Test @Test
void explicitConfigUrlWithYaml() { void explicitConfigUrlWithYaml() {
this.contextRunner this.contextRunner
.withPropertyValues("spring.hazelcast.config=clas spath:org/springframework/" .withPropertyValues("spring.hazelcast.config=clas spath:org/springframework/"
+ "boot/autoconfigure/hazelcast/h azelcast-client-specific.yaml") + "boot/autoconfigure/hazelcast/h azelcast-client-specific.yaml")
.run(assertSpecificHazelcastClient("explicit-yaml ")); .run(assertSpecificHazelcastClient("explicit-yaml "));
} }
@Test @Test
void explicitConfigUrlWithYml() {
this.contextRunner
.withPropertyValues("spring.hazelcast.config=clas
spath:org/springframework/"
+ "boot/autoconfigure/hazelcast/h
azelcast-client-specific.yml")
.run(assertSpecificHazelcastClient("explicit-yml"
));
}
@Test
void unknownConfigFile() { void unknownConfigFile() {
this.contextRunner.withPropertyValues("spring.hazelcast.config=fo o/bar/unknown.xml") this.contextRunner.withPropertyValues("spring.hazelcast.config=fo o/bar/unknown.xml")
.run((context) -> assertThat(context).getFailure( ).isInstanceOf(BeanCreationException.class) .run((context) -> assertThat(context).getFailure( ).isInstanceOf(BeanCreationException.class)
.hasMessageContaining("foo/bar/un known.xml")); .hasMessageContaining("foo/bar/un known.xml"));
} }
@Test @Test
void clientConfigTakesPrecedence() { void clientConfigTakesPrecedence() {
this.contextRunner.withUserConfiguration(HazelcastServerAndClient Config.class) this.contextRunner.withUserConfiguration(HazelcastServerAndClient Config.class)
.withPropertyValues("spring.hazelcast.config=this -is-ignored.xml").run((context) -> assertThat(context) .withPropertyValues("spring.hazelcast.config=this -is-ignored.xml").run((context) -> assertThat(context)
 End of changes. 4 change blocks. 
1 lines changed or deleted 31 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)