HHH-7569 Correct multiple failures/issues in
hibernate-core-master-matrix CI job
This commit is contained in:
parent
86deac49f7
commit
f63b0c5f69
|
@ -79,7 +79,7 @@ public class TransactionTimeoutTest extends BaseCoreFunctionalTestCase {
|
|||
public void testTransactionTimeoutSuccess() {
|
||||
Session session = openSession();
|
||||
Transaction transaction = session.getTransaction();
|
||||
transaction.setTimeout( 2 );
|
||||
transaction.setTimeout( 5 );
|
||||
transaction.begin();
|
||||
session.persist( new Person( "Lukasz", "Antoniak" ) );
|
||||
transaction.commit();
|
||||
|
|
|
@ -227,6 +227,8 @@ public class JarVisitorTest extends PackagingTestCase {
|
|||
@TestForIssue(jiraKey = "HHH-6806")
|
||||
public void testJarVisitorFactory() throws Exception{
|
||||
|
||||
addPackageToClasspath( buildExplodedPar(), buildDefaultPar() );
|
||||
|
||||
//setting URL to accept vfs based protocol
|
||||
URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
|
||||
public URLStreamHandler createURLStreamHandler(String protocol) {
|
||||
|
|
|
@ -84,8 +84,15 @@ public abstract class PackagingTestCase extends BaseCoreFunctionalTestCase {
|
|||
URL myUrl = originalClassLoader.getResource(
|
||||
PackagingTestCase.class.getName().replace( '.', '/' ) + ".class"
|
||||
);
|
||||
// this is assuming that there is a target directory
|
||||
int index = myUrl.getFile().lastIndexOf( "target" );
|
||||
int index;
|
||||
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 ) {
|
||||
fail( "Unable to setup packaging test" );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue