finally {
if (tx != null)
tx.commit();
}
for (int i = 0; i < gridCount(); i++) {
<BUG>if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
GridCacheEntryEx<Object, Object> curEntry =

((IgniteKernal)grid(0)).internalCache().entryEx(key);</BUG>
assertEquals(ttl, curEntry.ttl());

finally {
if (tx != null)
tx.commit();
}
long[] expireTimes = new long[gridCount()];
for (int i = 0; i < gridCount(); i++) {
if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
c0 = ((IgniteKernal)grid(i)).internalCache();
if (c0.isNear())
c0 = c0.context().near().dht();
GridCacheEntryEx<Object, Object> curEntry = c0.peekEx(key);
assertEquals(ttl, curEntry.ttl());
