Spring Boot 1.4 + Hibernate 5集成测试''java.io.IOException:打开文件太多错误''

时间:2016-10-11 04:49:54

标签: spring hibernate spring-boot integration-testing spring-test

我使用spring boot 1.4进行测试(新注释@SpringBootTest ...)

当我运行它集成test.i时出现以下错误:

[2016-10-11 11:54:13.762] [tiger-All-Series] [main] [] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean@buildNativeEntityManagerFactory:382 - Initialized JPA EntityManagerFactory for persistence unit 'default'
[2016-10-11 11:54:13.993] [tiger-All-Series] [pool-6-thread-1] [] ERROR o.a.h.i.n.c.InternalHttpAsyncClient@run:66 - I/O reactor terminated abnormally
org.apache.http.nio.reactor.IOReactorException: Failure opening selector
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:103)
    at org.apache.http.impl.nio.reactor.BaseIOReactor.<init>(BaseIOReactor.java:85)
    at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:318)
    at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)
    at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Too many open files
    at sun.nio.ch.IOUtil.makePipe(Native Method)
    at sun.nio.ch.EPollSelectorImpl.<init>(EPollSelectorImpl.java:65)
    at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:36)
    at java.nio.channels.Selector.open(Selector.java:227)
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:101)
    ... 5 common frames omitted

这发生在第二个测试课上。 (这似乎是Hibernate EntityManagerFactory的问题),我在这里得到一些信息stackoverflow 但它无法解决我的问题

0 个答案:

没有答案