3
jersey test with grizzly2를 사용하여 조롱 된 REST 리소스에 대한 승인 테스트를 실행합니다. 내 창문에는 모든 것이 잘되어있다.Linux 또는 Mac에서 @Transactional 및 JerseyTest 문제 (Windows에서는 지원되지 않음)
나 '.. 다른 프로세스가 9998을 사용하지 :
INFO: Creating Grizzly2 Web Container configured at the base URI http://localhost:9998/
02.08.2012 09:46:36 org.glassfish.grizzly.http.server.HttpServer start
SEVERE: Failed to start listener [NetworkListener{name='grizzly', host='localhost', port=9998, secure=false}] : java.net.BindException: Address already in use
은 분명히 우리가 그렇지 않은 것을 확인 :하지만 그의 Mac에서 다른 개발자는 (리눅스) 우리 젠킨스와 같은 오류가 발생한다
@ContextConfiguration({ "classpath:context-test.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
@TransactionConfiguration(defaultRollback = true)
public class TestPage extends JerseyTest {
public TestPage() throws Exception {
super("", "", "path.to.package");
}
// init database to be rolled back after test
// ...
// test that calls a controller requiring database access and then sends a request to a mock REST resource.
// ...
}
그래서 여기 질문은 다음과 같습니다 : 왜 창문에 그 확장 JerseyTest와 함께 @Transactional을 사용하고, 하나의 시험에 아래로 문제를 추적하고 봤어요? 그리고 @Transactional을 사용하는 것이 잘못된 것입니다.
편집 2 @ 트랜잭션이 프록시를 만드는 것처럼 보입니다. See here