core: fix cancelling inline file transfer (#1867)

* core: fix cancelling inline file transfer

* fix test
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2023-02-01 00:01:22 +00:00
1 parent c2cd58f63d
commit ea64be55e1
2 files changed
+12 -10

No files matched your search

+5 -6
View File
@@ -89,7 +89,7 @@ chatTests = do
describe "sending and receiving files" $ do
describe "send and receive file" $ fileTestMatrix2 runTestFileTransfer
it "send and receive file inline (without accepting)" testInlineFileTransfer
xit "accept inline file transfer, sender cancels during transfer" testAcceptInlineFileSndCancelDuringTransfer
it "accept inline file transfer, sender cancels during transfer" testAcceptInlineFileSndCancelDuringTransfer
it "send and receive small file inline (default config)" testSmallInlineFileTransfer
it "small file sent without acceptance is ignored in terminal by default" testSmallInlineFileIgnored
it "receive file inline with inline=on option" testReceiveInline
@@ -1941,14 +1941,13 @@ testAcceptInlineFileSndCancelDuringTransfer =
[ do
alice <##. "cancelled sending file 1 (test_1MB.pdf)"
alice <## "completed sending file 1 (test_1MB.pdf) to bob",
bob <## "completed receiving file 1 (test_1MB.pdf) from alice"
do
bob <## "completed receiving file 1 (test_1MB.pdf) from alice"
bob <## "alice cancelled sending file 1 (test_1MB.pdf)"
]
_ <- getTermLine alice
alice #> "@bob hi"
bob #> "@alice hey"
_ <- getTermLine bob
bob <## "alice cancelled sending file 1 (test_1MB.pdf)"
bob <# "alice> hi"
bob #> "@alice hey"
alice <# "bob> hey"
where
cfg = testCfg {inlineFiles = defaultInlineFilesConfig {offerChunks = 100, receiveChunks = 50}}