Skip to content

Commit 64a2d9f

Browse files
committed
fixes ttl
1 parent 5f8424d commit 64a2d9f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

elasticsearch-driver/src/test/java/org/jnosql/diana/elasticsearch/document/ElasticsearchDocumentCollectionManagerAsyncTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.junit.jupiter.api.BeforeEach;
2626
import org.junit.jupiter.api.Test;
2727

28+
import java.time.Duration;
2829
import java.util.List;
2930
import java.util.concurrent.atomic.AtomicBoolean;
3031
import java.util.concurrent.atomic.AtomicReference;
@@ -36,6 +37,7 @@
3637
import static org.jnosql.diana.elasticsearch.document.DocumentEntityGerator.INDEX;
3738
import static org.jnosql.diana.elasticsearch.document.DocumentEntityGerator.getEntity;
3839
import static org.junit.jupiter.api.Assertions.assertFalse;
40+
import static org.junit.jupiter.api.Assertions.assertThrows;
3941
import static org.junit.jupiter.api.Assertions.assertTrue;
4042

4143

@@ -138,4 +140,15 @@ public void shouldReturnAll() {
138140
}
139141

140142

143+
@Test
144+
public void shouldInsertTTL() {
145+
assertThrows(UnsupportedOperationException.class, () -> {
146+
entityManagerAsync.insert(getEntity(), Duration.ofSeconds(1L));
147+
});
148+
149+
assertThrows(UnsupportedOperationException.class, () -> {
150+
entityManagerAsync.insert(getEntity(), Duration.ofSeconds(1L), l -> {
151+
});
152+
});
153+
}
141154
}

0 commit comments

Comments
 (0)