Skip to content

Commit 8de61ad

Browse files
sanagaraj-pivotalBoykoAlex
authored andcommitted
Fixing Tests
1 parent facb0b8 commit 8de61ad

File tree

16 files changed

+168
-229
lines changed

16 files changed

+168
-229
lines changed

applications/spring-boot-upgrade/src/test/java/org/springframework/sbm/ReportTestSingleModule.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2021 - 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.springframework.sbm;
217

318
import org.junit.jupiter.api.Test;

components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/SpringBootUpgradeReportDeserializationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void deserializeAction() throws IOException, URISyntaxException {
8787
sections:
8888
8989
- title: Upgrade Dependencies
90-
helper: org.springframework.sbm.boot.upgrade_27_30.report.helper.UpgradeDependenciesHelper
90+
helper: org.springframework.sbm.boot.upgrade_27_30.report.helper.IsSpring27Or30ProjectHelper
9191
change: |-
9292
Spring Boot 3.0 upgraded many used dependencies.\s
9393
Also, dependencies previously in the `javax` packages use the new `jakarta` packages now.

components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/JSONBReportSectionTest.java

Lines changed: 0 additions & 70 deletions
This file was deleted.
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.sbm.project.resource.TestProjectContext;
2323

2424

25-
public class JohnzonDependencyHelperSectionTest {
25+
public class JohnzonDependencyReportSectionTest {
2626

2727
@Test
2828
public void shouldNotShowJsonBSection() {
@@ -55,16 +55,11 @@ public void rendersBannerSupportInformation() {
5555
A Jakarta EE 10-compatible version of Apache Johnzon can be used with Spring Boot 3, but you will now have to specify a version in your dependency declaration.
5656
5757
==== Why is the application affected
58-
Actually, we don't know if the scanned application is really affected by this change.
59-
But we found a dependency matching regex `org\\.springframework\\.boot\\:spring-boot-starter\\:.*`.
60-
This indicates that the scanned application might be affected.
58+
This application uses johnzon-core from org.apache.johnzon. Spring Boot 3.0 does not provide dependency support for this library,
59+
so an explicit version number must now be provided in the POM for this dependency.
6160
6261
==== Remediation
63-
[IMPORTANT]
64-
====
65-
This section has been automatically generated from the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#json-b[Spring Boot 3.0 Migration Guide^, role="ext-link"]. +
66-
**Please consider contributing to issue https://github.com/spring-projects-experimental/spring-boot-migrator/issues/678[#678^, role="ext-link"]**
67-
====
62+
This recipe will add an explicit version number to the org.apache.johnzon:johnzon-core dependency in the POM.
6863
6964
7065
""");

components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/ComplexSubflowsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void shouldHaveMethodsForSubflows() {
131131
"public class FlowConfigurations {\n" +
132132
" @Bean\n" +
133133
" IntegrationFlow hbfr_bil_risk_client_rating_mb05_hub_sys_main(org.springframework.integration.dsl.IntegrationFlow set_hbfr_headers_out) {\n" +
134-
" return IntegrationFlows.from(Http.inboundChannelAdapter(\"${http.listener.path}/*\")).handle((p, h) -> p)\n" +
134+
" return IntegrationFlows.from(Http.inboundGateway(\"${http.listener.path}/*\")).handle((p, h) -> p)\n" +
135135
" .gateway(set_hbfr_headers_out)\n" +
136136
" //FIXME: element is not supported for conversion: <message-properties-transformer/>\n" +
137137
" .log(LoggingHandler.Level.INFO, \"${api.name}\", \"transactionId=\\\"${flowVars.transactionId}\\\", extCorrelationId=\\\"${flowVars.extCorrelationId}\\\", step=\\\"RequestParametersReceived\\\",functionalId=\\\"${flowVars.functionalId}\\\", requesterAppId=\\\"${flowVars.requesterAppId}\\\", requesterAppName=\\\"${flowVars.requesterAppName}\\\",interfaceType=\\\"${flowVars.interfaceType}\\\", requesterUserId=\\\"${flowVars.requesterUserId}\\\", httpMethod=\\\"#[message.inboundProperties.'http.method']\\\", httpScheme=\\\"#[message.inboundProperties.'http.scheme']\\\", httpHost=\\\"#[message.inboundProperties.'host']\\\", httpRequestUri=\\\"#[message.inboundProperties.'http.request.uri']\\\", httpQueryString=\\\"#[message.inboundProperties.'http.query.string']\\\" httpVersion=\\\"#[message.inboundProperties.'http.version']\\\", contentType=\\\"#[message.inboundProperties.'content-type']\\\", proxyClientId=\\\"#[message.inboundProperties.'client_id']\\\"\")\n" +

components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLChoiceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void supportsBasicChoiceElement() {
6868
"public class FlowConfigurations {\n" +
6969
" @Bean\n" +
7070
" IntegrationFlow choiceFlow() {\n" +
71-
" return IntegrationFlows.from(Http.inboundChannelAdapter(\"/choice\")).handle((p, h) -> p)\n" +
71+
" return IntegrationFlows.from(Http.inboundGateway(\"/choice\")).handle((p, h) -> p)\n" +
7272
" //FIXME: element is not supported for conversion: <expression-filter/>\n" +
7373
" //FIXME: element is not supported for conversion: <set-variable/>\n" +
7474
" /* TODO: LinkedMultiValueMap might not be apt, substitute with right input type*/\n" +
@@ -143,7 +143,7 @@ public void whenExpressionCallsSubFlow() {
143143
"public class FlowConfigurations {\n" +
144144
" @Bean\n" +
145145
" IntegrationFlow choiceFlow(org.springframework.integration.dsl.IntegrationFlow spanishHello) {\n" +
146-
" return IntegrationFlows.from(Http.inboundChannelAdapter(\"/choice\")).handle((p, h) -> p)\n" +
146+
" return IntegrationFlows.from(Http.inboundGateway(\"/choice\")).handle((p, h) -> p)\n" +
147147
" //FIXME: element is not supported for conversion: <expression-filter/>\n" +
148148
" //FIXME: element is not supported for conversion: <set-variable/>\n" +
149149
" /* TODO: LinkedMultiValueMap might not be apt, substitute with right input type*/\n" +
@@ -223,7 +223,7 @@ public void choiceDoesNotHaveOtherwise() {
223223
"public class FlowConfigurations {\n" +
224224
" @Bean\n" +
225225
" IntegrationFlow choiceFlow(org.springframework.integration.dsl.IntegrationFlow spanishHello) {\n" +
226-
" return IntegrationFlows.from(Http.inboundChannelAdapter(\"/choice\")).handle((p, h) -> p)\n" +
226+
" return IntegrationFlows.from(Http.inboundGateway(\"/choice\")).handle((p, h) -> p)\n" +
227227
" //FIXME: element is not supported for conversion: <expression-filter/>\n" +
228228
" //FIXME: element is not supported for conversion: <set-variable/>\n" +
229229
" /* TODO: LinkedMultiValueMap might not be apt, substitute with right input type*/\n" +

0 commit comments

Comments
 (0)