public FutureAssert<T> isSuccessful() { return isSuccessful( value -> { } ); }
public static void assertJsonEquals(String expectedJson, String actualJson) { assertJsonEquals( expectedJson, actualJson, JSONCompareMode.NON_EXTENSIBLE ); }
public static <T> FutureAssert<T> assertThat(Future<T> future) { return new FutureAssert<>( future ); }
private FullTextSessionBuilder buildFullTextSessionBuilder(String objectLookUpMethod, String databaseRetrievalMethod) { FullTextSessionBuilder fullTextSessionBuilder = new FullTextSessionBuilder() .addAnnotatedClass( Foo.class ); if ( objectLookUpMethod != null ) { fullTextSessionBuilder.setProperty( "hibernate.search.query.object_lookup_method", objectLookUpMethod ); } if ( databaseRetrievalMethod != null ) { fullTextSessionBuilder.setProperty( "hibernate.search.query.database_retrieval_method", databaseRetrievalMethod ); } return fullTextSessionBuilder.build(); }
void apply(FullTextSessionBuilder node) { node.setProperty("hibernate.search.default.index_flush_interval", "1000"); node.setProperty("hibernate.search.default.worker.execution", "async"); } },
@SuppressWarnings("resource") private FullTextSessionBuilder getFullTextSessionBuilder() { return new FullTextSessionBuilder() .addAnnotatedClass( Address.class ) .addAnnotatedClass( Country.class ); }
public FutureAssert<T> isPending() { try { Object result = getNow(); failWithMessage( "future <%s> should be pending, but instead it succeeded with result <%s>", actual, result ); } catch (TimeoutException e) { // All's good } catch (CancellationException e) { failWithCauseAndMessage( e, "future <%s> should be pending, but instead it's been cancelled", actual, e ); } catch (ExecutionException e) { failWithCauseAndMessage( e, "future <%s> should be pending, but instead it failed with exception: %s", actual, e ); } return this; }
public FutureAssert<T> isFailed() { return isFailed( throwable -> { } ); }
/** * Closes the SessionFactory, SearchFactory and Infinispan CacheManagers. Only service to survive is the H2 in memory * database, and the data stored by the CacheLoader enabled in the Infinispan configuration. */ public void stopNode() { if (node != null) { node.close(); node = null; } }
public DdlTransactionIsolatorTestingImpl(ServiceRegistry serviceRegistry, Connection jdbConnection) { this( serviceRegistry, createJdbcConnectionAccess( jdbConnection ) ); }
public DdlTransactionIsolatorTestingImpl(ServiceRegistry serviceRegistry, JdbcConnectionAccess jdbcConnectionAccess) { super( createJdbcContext( jdbcConnectionAccess, serviceRegistry ) ); }
private FullTextSessionBuilder createMasterNode() { return new FullTextSessionBuilder() .addAnnotatedClass( SnowStorm.class ) .setProperty( "hibernate.search.default.sourceBase", root.toAbsolutePath() + masterCopy ) .setProperty( "hibernate.search.default.indexBase", root.toAbsolutePath() + masterMain ) .setProperty( "hibernate.search.default.directory_provider", "filesystem-master" ) .build(); }
void apply(FullTextSessionBuilder node) { // It also happens to be the default, but things might change: node.setProperty("hibernate.search.default.worker.execution", "sync"); } };
public static void assertJsonEqualsIgnoringUnknownFields(String expectedJson, String actualJson) { assertJsonEquals( expectedJson, actualJson, JSONCompareMode.LENIENT ); }
public DdlTransactionIsolatorTestingImpl(ServiceRegistry serviceRegistry, ConnectionProvider connectionProvider) { this( serviceRegistry, createJdbcConnectionAccess( connectionProvider ) ); }
void apply(FullTextSessionBuilder node) { node.setProperty("hibernate.search.default.worker.execution", "async"); } },
void apply(FullTextSessionBuilder node) { node.setProperty(key, "true"); } },
void apply(FullTextSessionBuilder node) { node.setProperty(key, "false"); } };
void apply(FullTextSessionBuilder node) { node.setProperty("hibernate.search.default.directory_provider", "infinispan"); } },
void apply(FullTextSessionBuilder node) { node.setProperty("hibernate.search.default.indexmanager", "infinispan"); } };