Examples of limitExecutionTimeTo()


Examples of org.hibernate.search.FullTextQuery.limitExecutionTimeTo()

    fts.clear();
  }

  private void assertExecutionTimeoutHasNoPartialResult() {
    FullTextQuery hibernateQuery = fts.createFullTextQuery( allSeikoClocksQuery, Clock.class );
    hibernateQuery.limitExecutionTimeTo( 30, TimeUnit.SECONDS );
    List results = hibernateQuery.list();
    assertEquals( "Test below limit termination", 500, results.size() );
    assertFalse( hibernateQuery.hasPartialResults() );
    fts.clear();
  }
View Full Code Here

Examples of org.hibernate.search.FullTextQuery.limitExecutionTimeTo()

    fts.clear();
  }

  private void assertExecutionTimeoutOccursOnList() {
    FullTextQuery hibernateQuery = fts.createFullTextQuery( allSwatchClocksQuery, Clock.class );
    hibernateQuery.limitExecutionTimeTo( 1, TimeUnit.NANOSECONDS );
    List result = hibernateQuery.list();
    System.out.println( "Result size early: " + result.size() );
    assertEquals( "Test early failure, before the number of results are even fetched", 0, result.size() );
    if ( result.size() == 0 ) {
      //sometimes, this
View Full Code Here

Examples of org.hibernate.search.jpa.FullTextQuery.limitExecutionTimeTo()

//    assertTrue( hibernateQuery.hasPartialResults() );
//
//    fts.clear();

    hibernateQuery = em.createFullTextQuery( query, Clock.class );
    hibernateQuery.limitExecutionTimeTo( 30, TimeUnit.SECONDS );
    results = hibernateQuery.getResultList();
    assertEquals( "Test below limit termination", 500, results.size() );
    assertFalse( hibernateQuery.hasPartialResults() );

    em.getTransaction().commit();
View Full Code Here

Examples of org.hibernate.search.jpa.FullTextQuery.limitExecutionTimeTo()

    em.clear();

    query = builder.keyword().onField( "brand" ).matching( "Swatch" ).createQuery();
    hibernateQuery = em.createFullTextQuery( query, Clock.class );
    hibernateQuery.limitExecutionTimeTo( 1, TimeUnit.NANOSECONDS );
    List result = hibernateQuery.getResultList();
    System.out.println( "Result size early: " + result.size() );
    assertEquals( "Test early failure, before the number of results are even fetched", 0, result.size() );
    if ( result.size() == 0 ) {
      //sometimes, this
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.