HHH-5025 - Comments
This commit is contained in:
parent
97d2ee3dac
commit
5a1697a77e
|
@ -42,14 +42,15 @@ public class HibernateSecLvlQueryCache extends AbstractSessionTest {
|
|||
|
||||
@Test
|
||||
public void testSecLvlCacheWithRevisionTypeDiskPersistent() {
|
||||
/* Invoking the same query twice for caching purpose. */
|
||||
invokeSampleCacheableQuery();
|
||||
invokeSampleCacheableQuery();
|
||||
// Invoking the same query twice for caching purpose.
|
||||
invokeSampleCachingRevTypeQuery();
|
||||
invokeSampleCachingRevTypeQuery();
|
||||
|
||||
assert getQueryCacheStatistics() > 0;
|
||||
}
|
||||
|
||||
private void invokeSampleCacheableQuery() {
|
||||
private void invokeSampleCachingRevTypeQuery() {
|
||||
// Cached query that requires serializing RevisionType variable when persisting to disk.
|
||||
getAuditReader().createQuery().forEntitiesAtRevision(StrTestEntity.class, 1)
|
||||
.add(new RevisionTypeAuditExpression(RevisionType.ADD, "="))
|
||||
.setCacheable(true).getResultList();
|
||||
|
|
Loading…
Reference in New Issue