- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个 Spring Boot 项目,有两个应用程序,一个在 src/test 中,一个在 src/main 中。我有两个应用程序,一个用于与 SOAP 端点连接的中介器,另一个充当模拟服务器来测试我的单元测试和集成测试。
我想在我的 Spring Boot 应用程序中创建一个集成测试来测试 getVersion 的 SOAPUI 调用。我想在 Spring Boot 中模拟 SOAPUI 调用并测试它是否命中,并且我必须以这种方式启动两个应用程序(我的模拟服务器用于运行集成测试,我的主应用程序用于连接到 SOAP Web 服务)
我拥有的一些东西是我必须点击的 URI:
https://127.0.0.1:28433/dave/ws/billingtool
这是我的 SOAPUI getVersion(信封请求输入)的左侧
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.billing.nulogix.com">
<soapenv:Header/>
<soapenv:Body>
<ser:getVersion/>
</soapenv:Body>
</soapenv:Envelope>
我在我的 main/resources 中定义了一个 WSDL,以及一个请求 StudyDetailsSchema.xjb 和 .xsd 以及一个 response.xsd
到目前为止我将此作为测试
@Autowired
private String studyDetailDemo;
@Test
public void soapTest() throws ClientProtocolException, IOException {
String result = Request.Post("https://127.0.0.1:28433")
.connectTimeout(2000)
.socketTimeout(2000)
.bodyString(studyDetailDemo, ContentType.TEXT_PLAIN)
.execute().returnContent().asString();
}
虽然这个测试失败了,但我不知道为什么。我将其配置为在端口 9119 上启动我的 src/test/app,在端口 28433 上启动我的 src/main/app。在预集成中,它启动我的主应用程序,然后使用我的 MockServerApp 运行测试。它们都首先关闭mockServerApp,然后关闭集成后的应用程序。
这是我的 POM
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.nulogix</groupId>
<artifactId>billing_mediator</artifactId>
<version>${nulogix-release-number}-${git.version.number}</version>
<packaging>jar</packaging>
<name>billing</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-jaxb2-plugin.version>0.14.0</maven-jaxb2-plugin.version>
<jaxb2-specVersion>2.2</jaxb2-specVersion>
<git-commit-id-plugin.version>2.2.4</git-commit-id-plugin.version>
<nulogix-release-number>0.9.6_M2</nulogix-release-number>
<git.version.number>${git.commit.time}.${git.commit.id.describe-short}</git.version.number>
<nulogix-billing-response-schema>nulogixBillingResponse_1.1.xsd</nulogix-billing-response-schema>
</properties>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformats-text</artifactId>
<version>2.10.0.pr1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>${maven-jaxb2-plugin.version}</version>
<executions>
<execution>
<id>id1-generate-service-end-point-from-wsdl</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<specVersion>${jaxb2-specVersion}</specVersion>
<schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
<generateDirectory>${project.basedir}/target/generated-sources/xjc/billing_endpoint</generateDirectory>
<generatePackage>com.nulogix.billing.service</generatePackage>
</configuration>
</execution>
<execution>
<id>id2-generate-pojo-from-request-xsd</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<specVersion>${jaxb2-specVersion}</specVersion>
<schemaDirectory>${project.basedir}/src/main/resources/xsd/request</schemaDirectory>
<schemaIncludes>
<include>StudyDetailsSchema_3.17.6.12.xsd</include>
</schemaIncludes>
<bindingDirectory>${project.basedir}/src/main/resources/xsd/request</bindingDirectory>
<bindingIncludes>
<include>StudyDetailsSchema_3.17.6.12.xjb</include>
</bindingIncludes>
<generateDirectory>${project.basedir}/target/generated-sources/xjc/request_model</generateDirectory>
<generatePackage>com.nulogix.billing.model.request</generatePackage>
</configuration>
</execution>
<execution>
<id>id3-generate-pojo-from-response-xsd</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<specVersion>${jaxb2-specVersion}</specVersion>
<schemaDirectory>${project.basedir}/src/main/resources/xsd/response</schemaDirectory>
<schemaIncludes>
<include>${nulogix-billing-response-schema}</include>
</schemaIncludes>
<generateDirectory>${project.basedir}/target/generated-sources/xjc/response_model</generateDirectory>
<generatePackage>com.nulogix.billing.model.response</generatePackage>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dateFormat>yyyyMMdd-HHmmss</dateFormat><!-- human-readable part of the version id -->
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile><!-- somehow necessary. otherwise the variables are not available in the pom -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Implementation-Version>${nulogix-release-number}-${git.version.number}</Implementation-Version>
<Git-Version-Number>${git.version.number}</Git-Version-Number>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.nulogix.billing.App</mainClass>
</configuration>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
当我运行 mvn verify 仅运行集成测试时,它说它在 28433 和 9119 上打开端口
[INFO] --- spring-boot-maven-plugin:2.1.0.RELEASE:start (pre-integration-test) @ billing_mediator ---
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2019-08-19 23:43:10.175 INFO 50954 --- [ling.App.main()] com.nulogix.billing.App : Starting App on Alexs-MacBook-Pro.local with PID 50954 (/Users/asluborski/Documents/billing/billing_mediator/target/classes started by asluborski in /Users/asluborski/Documents/billing/billing_mediator)
2019-08-19 23:43:10.177 DEBUG 50954 --- [ling.App.main()] com.nulogix.billing.App : Running with Spring Boot v2.1.0.RELEASE, Spring v5.1.2.RELEASE
2019-08-19 23:43:10.179 INFO 50954 --- [ling.App.main()] com.nulogix.billing.App : No active profile set, falling back to default profiles: default
2019-08-19 23:43:10.807 INFO 50954 --- [ling.App.main()] trationDelegate$BeanPostProcessorChecker : Bean 'webServiceConfig' of type [com.nulogix.billing.ws.endpoint.WebServiceConfig$$EnhancerBySpringCGLIB$$8e6919d9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-19 23:43:10.809 INFO 50954 --- [ling.App.main()] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$47c57f47] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-19 23:43:10.837 INFO 50954 --- [ling.App.main()] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
2019-08-19 23:43:11.183 INFO 50954 --- [ling.App.main()] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 28443 (https)
2019-08-19 23:43:11.202 INFO 50954 --- [ling.App.main()] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-08-19 23:43:11.202 INFO 50954 --- [ling.App.main()] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/9.0.12
2019-08-19 23:43:11.211 INFO 50954 --- [ling.App.main()] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/asluborski/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2019-08-19 23:43:11.279 INFO 50954 --- [ling.App.main()] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-08-19 23:43:11.280 INFO 50954 --- [ling.App.main()] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1072 ms
2019-08-19 23:43:11.306 INFO 50954 --- [ling.App.main()] o.s.b.w.servlet.ServletRegistrationBean : Servlet messageDispatcherServlet mapped to [/nulogix/ws/*]
2019-08-19 23:43:11.307 INFO 50954 --- [ling.App.main()] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-08-19 23:43:11.310 INFO 50954 --- [ling.App.main()] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-08-19 23:43:11.310 INFO 50954 --- [ling.App.main()] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-08-19 23:43:11.310 INFO 50954 --- [ling.App.main()] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'formContentFilter' to: [/*]
2019-08-19 23:43:11.310 INFO 50954 --- [ling.App.main()] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-08-19 23:43:11.339 DEBUG 50954 --- [ling.App.main()] c.n.b.service.PredictionEngineService : billing.engine.address=127.0.0.1
2019-08-19 23:43:11.339 DEBUG 50954 --- [ling.App.main()] c.n.b.service.PredictionEngineService : billing.engine.port=9119
2019-08-19 23:43:11.339 DEBUG 50954 --- [ling.App.main()] c.n.b.service.PredictionEngineService : Using http://127.0.0.1:9119
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/Users/asluborski/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-08-19 23:43:11.638 DEBUG 50954 --- [ling.App.main()] c.n.billing.ws.endpoint.AnalyzeEndPoint : billing.engine.api.version=0.97
2019-08-19 23:43:11.638 DEBUG 50954 --- [ling.App.main()] c.n.billing.ws.endpoint.AnalyzeEndPoint : billing.engine.core.version=0.97
2019-08-19 23:43:11.638 DEBUG 50954 --- [ling.App.main()] c.n.billing.ws.endpoint.AnalyzeEndPoint : billing.engine.core.name=Nulogix_Patient_Responsibility
2019-08-19 23:43:11.640 DEBUG 50954 --- [ling.App.main()] c.n.b.ws.endpoint.GetVersionEndPoint : billing.engine.api.version=0.97
2019-08-19 23:43:11.778 INFO 50954 --- [ling.App.main()] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-08-19 23:43:12.301 INFO 50954 --- [ling.App.main()] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 28443 (https) with context path ''
2019-08-19 23:43:12.304 INFO 50954 --- [ling.App.main()] com.nulogix.billing.App : Started App in 2.474 seconds (JVM running for 10.674)
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:integration-test (default) @ billing_mediator ---
[INFO] Failsafe report directory: /Users/asluborski/Documents/billing/billing_mediator/target/failsafe-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2019-08-19 23:43:18.744 INFO 50977 --- [ main] c.n.b.ws.endpoint.BillingMediatorIT : Starting BillingMediatorIT on Alexs-MacBook-Pro.local with PID 50977 (started by asluborski in /Users/asluborski/Documents/billing/billing_mediator)
2019-08-19 23:43:18.745 DEBUG 50977 --- [ main] c.n.b.ws.endpoint.BillingMediatorIT : Running with Spring Boot v2.1.0.RELEASE, Spring v5.1.2.RELEASE
2019-08-19 23:43:18.747 INFO 50977 --- [ main] c.n.b.ws.endpoint.BillingMediatorIT : No active profile set, falling back to default profiles: default
2019-08-19 23:43:19.410 INFO 50977 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$4eacc45] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-19 23:43:19.443 INFO 50977 --- [ main] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
2019-08-19 23:43:19.803 INFO 50977 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9119 (http)
2019-08-19 23:43:19.820 INFO 50977 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-08-19 23:43:19.821 INFO 50977 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/9.0.12
2019-08-19 23:43:19.829 INFO 50977 --- [ main] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/asluborski/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2019-08-19 23:43:19.914 INFO 50977 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-08-19 23:43:19.914 INFO 50977 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1141 ms
2019-08-19 23:43:19.999 INFO 50977 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-08-19 23:43:20.000 INFO 50977 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Servlet messageDispatcherServlet mapped to [/services/*]
2019-08-19 23:43:20.006 INFO 50977 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-08-19 23:43:20.007 INFO 50977 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-08-19 23:43:20.007 INFO 50977 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'formContentFilter' to: [/*]
2019-08-19 23:43:20.007 INFO 50977 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-08-19 23:43:20.007 INFO 50977 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationRequestSizeLimitFilter' to: [/*]
2019-08-19 23:43:20.021 DEBUG 50977 --- [ main] .n.b.m.ApplicationRequestSizeLimitFilter : Filter 'applicationRequestSizeLimitFilter' configured for use
2019-08-19 23:43:20.073 DEBUG 50977 --- [ main] c.n.b.ws.endpoint.GetVersionEndPoint : billing.engine.api.version=0.97
WARNING: An illegal reflective access operation has occurred
SUREFIRE-859: WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/Users/asluborski/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-08-19 23:43:20.430 DEBUG 50977 --- [ main] c.n.b.service.PredictionEngineService : billing.engine.address=127.0.0.1
2019-08-19 23:43:20.430 DEBUG 50977 --- [ main] c.n.b.service.PredictionEngineService : billing.engine.port=9119
2019-08-19 23:43:20.430 DEBUG 50977 --- [ main] c.n.b.service.PredictionEngineService : Using http://127.0.0.1:9119
2019-08-19 23:43:20.431 DEBUG 50977 --- [ main] c.n.billing.ws.endpoint.AnalyzeEndPoint : billing.engine.api.version=0.97
2019-08-19 23:43:20.431 DEBUG 50977 --- [ main] c.n.billing.ws.endpoint.AnalyzeEndPoint : billing.engine.core.version=0.97
2019-08-19 23:43:20.431 DEBUG 50977 --- [ main] c.n.billing.ws.endpoint.AnalyzeEndPoint : billing.engine.core.name=Nulogix_Patient_Responsibility
2019-08-19 23:43:20.657 INFO 50977 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-08-19 23:43:21.125 INFO 50977 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9119 (http) with context path ''
2019-08-19 23:43:21.130 INFO 50977 --- [ main] c.n.b.ws.endpoint.BillingMediatorIT : Started BillingMediatorIT in 7.641 seconds (JVM running for 8.125)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.912 sec <<< FAILURE! - in com.nulogix.billing.ws.endpoint.BillingMediatorIT
soapTest(com.nulogix.billing.ws.endpoint.BillingMediatorIT) Time elapsed: 0.239 sec <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:28433 [/127.0.0.1] failed: Connection refused (Connection refused)
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:591)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:394)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.apache.http.client.fluent.Request.internalExecute(Request.java:173)
at org.apache.http.client.fluent.Request.execute(Request.java:177)
at com.nulogix.billing.ws.endpoint.BillingMediatorIT.soapTest(BillingMediatorIT.java:30)
2019-08-19 23:43:21.377 INFO 50977 --- [ Thread-2] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
Results :
Tests in error:
BillingMediatorIT.soapTest:30 » HttpHostConnect Connect to 127.0.0.1:28433 [/1...
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] --- spring-boot-maven-plugin:2.1.0.RELEASE:stop (post-integration-test) @ billing_mediator ---
[INFO] Stopping application...
2019-08-19 23:43:21.498 INFO 50954 --- [ main] inMXBeanRegistrar$SpringApplicationAdmin : Application shutdown requested.
2019-08-19 23:43:21.501 INFO 50954 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:verify (default) @ billing_mediator ---
[INFO] Failsafe report directory: /Users/asluborski/Documents/billing/billing_mediator/target/failsafe-reports
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.197 s
[INFO] Finished at: 2019-08-19T23:43:21-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project billing_mediator: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/asluborski/Documents/billing/billing_mediator/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
我的 POM 设置有问题吗?
最佳答案
您确定要连接到端口 28433 吗?正如您所正确指出的,您的本地 tomcat 在端口 9119 上启动,当您想要测试本地运行的应用程序时,该端口通常是您想要连接的端口。
关于java - Spring Boot Soap 集成测试失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57580360/
有人可以解释一下 spring-boot-parent 和 spring-boot-starter-parent 之间的区别吗,正如我在下面附加的 GIT HUB 代码链接之一中看到的,他们为 spr
我有与 jersey 框架集成的 Spring Boot 应用程序。 现在,当我尝试运行该应用程序时,它只是停留在 Spring 启动徽标上,之后没有任何 react 。 我也尝试添加 -X ,但徽标
我指的是 Spring Boot 关于 的文档自动配置 和 执行器 模块: 自动配置: Spring Boot AutoConfiguration attempts to automatically
我正在尝试将 apache log4j 集成到我的 Spring boot 应用程序中。这是我的 build.gradle 文件: build.gradle buildscript { rep
使用 Spring Boot Maven 插件的以下命令在生产中启动 Spring Boot 应用程序是否是一个好主意或实践? mvn spring-boot:run 最佳答案 不,这是个坏主意。 您
据我所知,spring boot 和 spring session 为我们提供了一站式自动配置,但是当我的应用程序使用 session redis 和应用程序缓存 redis 时,不是同一个 redi
我希望使用Spring Boot创建一个新的Web应用程序。不幸的是,我的服务器在技术堆栈方面相当有限。它安装了Java 5。 谁能告诉我spring boot是否可以在Java 1.5上运行以及什么
我有3个实体 CarWash(设置Wash) Wash(car_wash_id FK到CarWash) WashComment(wash_id FK到Wash) 有什么办法可以写这个查询 @Qu
我一直在关注this文章。 我正在尝试在Spring-boot应用程序中优雅地处理gRPC错误,的主要目标是能够在gRPC客户端中获取错误状态。 在上面的文章之后,我坚持为异常添加拦截器。如何在Spr
我有一个要使用的自定义log4j布局插件。在IntelliJ中运行或与./gradlew bootRun一起运行时,插件可以正常工作。不使用./gradlew bootJar构建启动jar。 启用-D
我想在给定范围 (5001-5100) 的随机端口上启动 Spring Cloud 应用程序(Spring Boot 1.5.14,Spring Cloud Edgware.SR4)。我知道我们可以使
任何人都可以向我展示或指出不使用 spring boot gradle 插件的 spring boot gradle 项目。 我正在寻找类似不使用 gradle 插件的 spring boot sta
我当时尝试包含上述依赖项之一,但找不到任何区别: spring boot starter web:我可以看到 Flux 和 Mono 类并制作一个响应式(Reactive)休息 Controller
我们一直在为我们的应用程序使用 Springboot 1.X。 现在准备开始一些新的应用程序,想知道我们是应该使用 SpringBoot2.0 还是坚持使用 SpringBoot 1.X? 对一种方式
我希望记录应用程序正在加载 application-profile.propeties 或 application.yml。怎么做。在哪种方法中,我可以听取它并检测它是成功加载还是失败。 最佳答案 您
当我在 pom.xml 中添加简单的 spring-boot-starter-data-jpa 依赖项时,在 pom.xml 文件中出现错误。如果我删除该依赖项,则不会再有错误。我不确定为什么会发生这
我希望记录应用程序正在加载 application-profile.propeties 或 application.yml。怎么做。在哪种方法中,我可以听取它并检测它是成功加载还是失败。 最佳答案 您
我在网上看了很多关于 spring-boot-devtools 的文章和问题,但仍然无法弄清楚为什么它对我不起作用。每次运行我的应用程序时,我都会得到以下信息: 17:54:28.057 [main]
我正在尝试将现有的 Spring 应用程序移植到 Spring Boot。我不使用 spring-boot-starter-data-solr 启动器,但是我的类路径上有 apache solrj (
(这主要是一个历史问题。Pivotal 建议所有论坛讨论都在 StackOverflow 上进行,这就是我在这里问它的原因。) Spring Boot 项目用来证明将应用程序的类和依赖项从可执行 ja
我是一名优秀的程序员,十分优秀!