Skip to content

Commit

Permalink
HSEARCH-3282 Remove a weird use of SearchIntegrator in the (ORM) ToSt…
Browse files Browse the repository at this point in the history
…ringTest in migration helper tests
  • Loading branch information
yrodiere committed Sep 14, 2020
1 parent 168d1d3 commit cae9158
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -18,7 +18,6 @@
import org.hibernate.search.FullTextSession;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.hcore.util.impl.ContextHelper;
import org.hibernate.search.jpa.FullTextEntityManager;
import org.hibernate.search.jpa.Search;
import org.hibernate.search.query.dsl.QueryBuilder;
Expand Down Expand Up @@ -72,11 +71,8 @@ public Class<?>[] getAnnotatedClasses() {
}

private void assertToStringContainsLuceneQueryInformation(String fullTextQueryToString) {
String queryString = ContextHelper.getSearchIntegrator( fullTextSession )
.createHSQuery( luceneQuery, Foo.class )
.getQueryString();
assertThat( "Unexpected toString implementation. The string should contain a string representation of the internal query.",
fullTextQueryToString, CoreMatchers.containsString( queryString ) );
fullTextQueryToString, CoreMatchers.containsString( luceneQuery.toString() ) );
}

@Entity
Expand Down

0 comments on commit cae9158

Please sign in to comment.