Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes ttl
  • Loading branch information
otaviojava committed Mar 27, 2018
1 parent 5f8424d commit 64a2d9f
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -25,6 +25,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.time.Duration;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
Expand All @@ -36,6 +37,7 @@
import static org.jnosql.diana.elasticsearch.document.DocumentEntityGerator.INDEX;
import static org.jnosql.diana.elasticsearch.document.DocumentEntityGerator.getEntity;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;


Expand Down Expand Up @@ -138,4 +140,15 @@ public void shouldReturnAll() {
}


@Test
public void shouldInsertTTL() {
assertThrows(UnsupportedOperationException.class, () -> {
entityManagerAsync.insert(getEntity(), Duration.ofSeconds(1L));
});

assertThrows(UnsupportedOperationException.class, () -> {
entityManagerAsync.insert(getEntity(), Duration.ofSeconds(1L), l -> {
});
});
}
}

0 comments on commit 64a2d9f

Please sign in to comment.