Skip to content

Commit

Permalink
HSEARCH-4043 Make batch jsr352 IT runnable from IDE again
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever authored and yrodiere committed Nov 4, 2020
1 parent 7ac4720 commit 0795a78
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -36,13 +36,20 @@ public final class JobTestUtil {
private static final Log log = LoggerFactory.make( Log.class, MethodHandles.lookup() );

private static final int THREAD_SLEEP = 1000;
private static final String JSR325_TYPE_FOR_IDE_TESTS = "jbatch";

private JobTestUtil() {
}

public static JobOperator getAndCheckRuntime() {
JobOperator operator = BatchRuntime.getJobOperator();
String expectedType = System.getProperty( "org.hibernate.search.integrationtest.jsr352.type" );

// only for tests run from the IDE only
if ( expectedType == null ) {
expectedType = JSR325_TYPE_FOR_IDE_TESTS;
}

assertThat( operator ).extracting( Object::getClass ).asString()
.contains( expectedType );
log.infof( "JSR-352 operator type is %s (%s)", expectedType, operator.getClass() );
Expand Down

0 comments on commit 0795a78

Please sign in to comment.