165165 * @author Moritz Halbritter
166166 * @author Tadaya Tsuyukubo
167167 * @author Yanming Zhou
168+ * @author Sijun Yang
168169 */
169170@ ExtendWith (OutputCaptureExtension .class )
170171class SpringApplicationTests {
@@ -252,13 +253,13 @@ void logsActiveProfilesWithoutProfileAndSingleDefault(CapturedOutput output) {
252253 @ Test
253254 void logsActiveProfilesWithoutProfileAndMultipleDefaults (CapturedOutput output ) {
254255 MockEnvironment environment = new MockEnvironment ();
255- environment .setDefaultProfiles ("p0,p1 " , "default" );
256+ environment .setDefaultProfiles ("p0" , "default" );
256257 SpringApplication application = new SpringApplication (ExampleConfig .class );
257258 application .setWebApplicationType (WebApplicationType .NONE );
258259 application .setEnvironment (environment );
259260 this .context = application .run ();
260261 assertThat (output )
261- .contains ("No active profile set, falling back to 2 default profiles: \" p0,p1 \" , \" default\" " );
262+ .contains ("No active profile set, falling back to 2 default profiles: \" p0\" , \" default\" " );
262263 }
263264
264265 @ Test
@@ -273,9 +274,9 @@ void logsActiveProfilesWithSingleProfile(CapturedOutput output) {
273274 void logsActiveProfilesWithMultipleProfiles (CapturedOutput output ) {
274275 SpringApplication application = new SpringApplication (ExampleConfig .class );
275276 application .setWebApplicationType (WebApplicationType .NONE );
276- application .setAdditionalProfiles ("p1,p2 " , "p3 " );
277+ application .setAdditionalProfiles ("p1" , "p2 " );
277278 application .run ();
278- assertThat (output ).contains ("The following 2 profiles are active: \" p1,p2 \" , \" p3 \" " );
279+ assertThat (output ).contains ("The following 2 profiles are active: \" p1\" , \" p2 \" " );
279280 }
280281
281282 @ Test
0 commit comments