Commit 0f46193 1 parent 1e1c924 commit 0f46193 Copy full SHA for 0f46193
File tree 4 files changed +10
-5
lines changed
4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -584,6 +584,11 @@ def is_blink(self) -> bool:
584
584
"""Whether this table is a blink table."""
585
585
return _JBlinkTableTools .isBlink (self .j_table )
586
586
587
+ @property
588
+ def is_failed (self ) -> bool :
589
+ """Whether this table is in a failure state and is no longer usable."""
590
+ return self .j_table .isFailed ()
591
+
587
592
@cached_property
588
593
def update_graph (self ) -> UpdateGraph :
589
594
"""The update graph of the table."""
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def test_subscribe(self):
93
93
# TODO this test is flaky because of https://github.com/deephaven/deephaven-core/issues/5416, re-enable it
94
94
# when the issue is fixed.
95
95
# for _ in range(10):
96
- # if t.j_table.isFailed ():
96
+ # if t.is_failed ():
97
97
# break
98
98
# time.sleep(1)
99
99
# else:
Original file line number Diff line number Diff line change @@ -593,12 +593,12 @@ def test_snapshot_when_with_history(self):
593
593
t = time_table ("PT0.1S" ).update ("X = i % 2 == 0 ? i : i - 1" ).sort ("X" ).tail (10 )
594
594
with update_graph .shared_lock (t ):
595
595
snapshot_hist = self .test_table .snapshot_when (t , history = True )
596
- self .assertFalse (snapshot_hist .j_table . isFailed () )
596
+ self .assertFalse (snapshot_hist .is_failed )
597
597
self .wait_ticking_table_update (t , row_count = 10 , timeout = 2 )
598
598
# we have not waited for a whole cycle yet, wait for the shared lock to guarantee cycle is over
599
599
# to ensure snapshot_hist has had the opportunity to process the update we just saw
600
600
with update_graph .shared_lock (t ):
601
- self .assertTrue (snapshot_hist .j_table . isFailed () )
601
+ self .assertTrue (snapshot_hist .is_failed )
602
602
603
603
def test_agg_all_by (self ):
604
604
test_table = empty_table (10 )
Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ def test_partition_sub_failure(self):
348
348
with self .assertRaises (Exception ) as cm :
349
349
# failure_cb will be called in the background thread after 2 PUG cycles, 3 seconds timeout should be enough
350
350
self .wait_ticking_table_update (table , 600 , 3 )
351
- self .assertTrue (table .j_table . isFailed () )
351
+ self .assertTrue (table .is_failed )
352
352
353
353
def test_partition_size_sub_failure (self ):
354
354
pc_schema = pa .schema (
@@ -361,7 +361,7 @@ def test_partition_size_sub_failure(self):
361
361
# failure_cb will be called in the background thread after 2 PUG cycles, 3 seconds timeout should be enough
362
362
self .wait_ticking_table_update (table , 600 , 3 )
363
363
364
- self .assertTrue (table .j_table . isFailed () )
364
+ self .assertTrue (table .is_failed )
365
365
366
366
367
367
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments