File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
ravendb/tests/jvm_migrated_tests/client_tests Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 22import time
33
44from ravendb import MetadataAsDictionary , constants
5+ from ravendb .exceptions .documents .bulkinsert import BulkInsertAbortedException
56from 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+
You can’t perform that action at this time.
0 commit comments