Skip to content

Commit 8029b32

Browse files
committed
RDBC-644 BulkInsertsTest::canModifyMetadataWithBulkInsert
1 parent 4169ab6 commit 8029b32

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ravendb/tests/jvm_migrated_tests/client_tests/test_bulk_inserts.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import time
33

44
from ravendb import MetadataAsDictionary, constants
5+
from ravendb.exceptions.documents.bulkinsert import BulkInsertAbortedException
56
from ravendb.tests.test_base import TestBase
67

78

@@ -65,3 +66,12 @@ def test_can_modify_metadata_with_bulk_insert(self):
6566
entity = session.load("FooBars/1-A", FooBar)
6667
metadata_expiration_date = session.advanced.get_metadata_for(entity)[constants.Documents.Metadata.EXPIRES]
6768
self.assertEqual(expiration_date, metadata_expiration_date)
69+
70+
def test_killed_to_early(self):
71+
with self.assertRaises(BulkInsertAbortedException):
72+
with self.store.bulk_insert() as bulk_insert:
73+
bulk_insert.store_by_entity(FooBar())
74+
time.sleep(0.1) # todo: wait for operation to be created first, then try to kill it
75+
bulk_insert.abort()
76+
bulk_insert.store_by_entity(FooBar())
77+

0 commit comments

Comments
 (0)