Skip to content

Commit 67eb545

Browse files
committed
fix memory buffer tests
1 parent eb8597b commit 67eb545

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

distributed/shuffle/tests/test_memory_buffer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import pytest
44

5+
from distributed.shuffle._exceptions import DataUnavailable
56
from distributed.shuffle._memory import MemoryShardsBuffer
67
from distributed.utils_test import gen_test
78

@@ -21,7 +22,7 @@ async def test_basic():
2122
x = mf.read("x")
2223
y = mf.read("y")
2324

24-
with pytest.raises(KeyError):
25+
with pytest.raises(DataUnavailable):
2526
mf.read("z")
2627

2728
assert x == [b"0" * 1000] * 2
@@ -42,7 +43,7 @@ async def test_read_before_flush():
4243

4344
await mf.flush()
4445
assert mf.read("1") == [b"foo"]
45-
with pytest.raises(KeyError):
46+
with pytest.raises(DataUnavailable):
4647
mf.read("2")
4748

4849

0 commit comments

Comments
 (0)