- 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 BOM、Spring Boot 和 Spring IO 的文档。 但是没有说明,我们应该如何一起使用它们? 在我的项目中,我们已经有了自己的 Parent POM ,所以
我正在开发的很酷的企业应用程序正在转向 Spring。这对所有团队来说都是非常酷和令人兴奋的练习,但也是一个巨大的压力源。我们所做的是逐渐将遗留组件移至 Spring 上下文。现在我们有一个 huuu
我正在尝试使用 @Scheduled 运行 Spring 批处理作业注释如下: @Scheduled(cron = "* * * * * ?") public void launchMessageDi
我对这两个概念有点困惑。阅读 Spring 文档,我发现,例如。 bean 工厂是 Spring 容器。我还读到“ApplicationContext 是 BeanFactory 的完整超集”。但两者
我们有一个使用 Spring BlazeDS 集成的应用程序。到目前为止,我们一直在使用 Spring 和 Flex,它运行良好。我们现在还需要添加一些 Spring MVC Controller 。
假设我有一个类(class) Person带属性name和 age ,它可以像这样用 Spring 配置: 我想要一个自定义的 Spring 模式元素,这很容易做到,允许我在我的 Sp
如何在 Java 中以编程方式使用 Spring Data 创建 MongoDB 复合索引? 使用 MongoTemplate 我可以创建一个这样的索引:mongoTemplate.indexOps(
我想使用 spring-complex-task 执行我的应用程序,并且我已经构建了复杂的 spring-batch Flow Jobs,它执行得非常好。 你能解释一下spring批处理流作业与spr
我实现了 spring-boot 应用程序,现在我想将它用作非 spring 应用程序的库。 如何初始化 lib 类,以便 Autowiring 的依赖项按预期工作?显然,如果我使用“new”创建类实
我刚开始学习 spring cloud security,我有一个基本问题。它与 Spring Security 有何不同?我们是否需要在 spring boot 上构建我们的应用程序才能使用 spr
有很多人建议我使用 Spring Boot 而不是 Spring 来开发 REST Web 服务。我想知道这两者到底有什么区别? 最佳答案 总之 Spring Boot 减少了编写大量配置和样板代码的
您能向我解释一下如何使用 Spring 正确构建 Web 应用程序吗?我知道 Spring 框架的最新版本是 4.0.0.RELEASE,但是 Spring Security 的最新版本是 3.2.0
我如何才能知道作为 Spring Boot 应用程序的一部分加载的所有 bean 的名称?我想在 main 方法中有一些代码来打印服务器启动后加载的 bean 的详细信息。 最佳答案 如spring-
我有一个使用 Spring 3.1 构建的 RESTful API,也使用 Spring Security。我有一个 Web 应用程序,也是一个 Spring 3.1 MVC 应用程序。我计划让移动客
升级到 Spring 5 后,我在 Spring Rabbit 和 Spring AMQP 中遇到错误。 两者现在都设置为 1.5.6.RELEASE 有谁知道哪些版本应该与 Spring 5 兼容?
我现在已经使用 Spring Framework 3.0.5 和 Spring Security 3.0.5 多次了。我知道Spring框架使用DI和AOP。我还知道 Spring Security
我收到错误 Unable to Location NamespaceHandler when using context:annotation-config running (java -jar) 由
在 Spring 应用程序中嵌入唯一版本号的策略是什么? 我有一个使用 Spring Boot 和 Spring Web 的应用程序。 它已经足够成熟,我想对其进行版本控制并在运行时看到它显示在屏幕上
我正在使用 spring data jpa 进行持久化。如果存在多个具有相同名称的实体,是否有一种方法可以将一个实体标记为默认值。类似@Primary注解的东西用来解决多个bean的依赖问题 @Ent
我阅读了 Spring 框架的 DAOSupport 类。但是我无法理解这些 DAOSuport 类的优点。在 DAOSupport 类中,我们调用 getXXXTemplate() 方法来获取特定的
我是一名优秀的程序员,十分优秀!