HHH-5025 - Comments

This commit is contained in:
Lukasz Antoniak 2011-05-26 22:54:24 +02:00
parent 97d2ee3dac
commit 5a1697a77e
1 changed files with 5 additions and 4 deletions

View File

@ -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();