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