HHH-7569 Correct multiple failures/issues in

hibernate-core-master-matrix CI job
This commit is contained in:
brmeyer 2012-09-06 23:02:43 -04:00
parent 86deac49f7
commit f63b0c5f69
3 changed files with 12 additions and 3 deletions

View File

@ -79,7 +79,7 @@ public class TransactionTimeoutTest extends BaseCoreFunctionalTestCase {
public void testTransactionTimeoutSuccess() { public void testTransactionTimeoutSuccess() {
Session session = openSession(); Session session = openSession();
Transaction transaction = session.getTransaction(); Transaction transaction = session.getTransaction();
transaction.setTimeout( 2 ); transaction.setTimeout( 5 );
transaction.begin(); transaction.begin();
session.persist( new Person( "Lukasz", "Antoniak" ) ); session.persist( new Person( "Lukasz", "Antoniak" ) );
transaction.commit(); transaction.commit();

View File

@ -227,6 +227,8 @@ public class JarVisitorTest extends PackagingTestCase {
@TestForIssue(jiraKey = "HHH-6806") @TestForIssue(jiraKey = "HHH-6806")
public void testJarVisitorFactory() throws Exception{ public void testJarVisitorFactory() throws Exception{
addPackageToClasspath( buildExplodedPar(), buildDefaultPar() );
//setting URL to accept vfs based protocol //setting URL to accept vfs based protocol
URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() { URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
public URLStreamHandler createURLStreamHandler(String protocol) { public URLStreamHandler createURLStreamHandler(String protocol) {

View File

@ -84,8 +84,15 @@ public abstract class PackagingTestCase extends BaseCoreFunctionalTestCase {
URL myUrl = originalClassLoader.getResource( URL myUrl = originalClassLoader.getResource(
PackagingTestCase.class.getName().replace( '.', '/' ) + ".class" PackagingTestCase.class.getName().replace( '.', '/' ) + ".class"
); );
// this is assuming that there is a target directory int index;
int index = myUrl.getFile().lastIndexOf( "target" ); if (myUrl.getFile().contains( "target" )) {
// assume there's normally a /target
index = myUrl.getFile().lastIndexOf( "target" );
} else {
// if running in some IDEs, may be in /bin instead
index = myUrl.getFile().lastIndexOf( "bin" );
}
if ( index == -1 ) { if ( index == -1 ) {
fail( "Unable to setup packaging test" ); fail( "Unable to setup packaging test" );
} }