Skip to content

Commit d61cee1

Browse files
committed
fixup
1 parent 3883924 commit d61cee1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/AzStorage.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -996,8 +996,6 @@ function status(c::AzContainer, b::AbstractString)
996996
copy_reason = HTTP.header(r_status, "x-ms-copy-status-description")
997997

998998
Dict("status"=>copy_status, "progress"=>copy_progress, "reason"=>copy_reason)
999-
1000-
nothing
1001999
end
10021000

10031001
function Base.cp(inc::AzContainer, inb::AbstractString, outc::AzContainer, outb::AbstractString; showprogress=false, async=false)
@@ -1028,7 +1026,7 @@ function Base.cp(inc::AzContainer, inb::AbstractString, outc::AzContainer, outb:
10281026
while true
10291027
local stat
10301028
try
1031-
stat = cp_status(outc, outb)
1029+
stat = status(outc, outb)
10321030
catch
10331031
@warn "unable to get copy status for blob copy, retrying..."
10341032
stat = Dict("status"=>"unknown")

test/runtests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,16 @@ end
548548
write(c, "foo.txt", "Hello world")
549549
cp(c, "foo.txt", c, "bar.txt")
550550
@test read(c, "bar.txt", String) == "Hello world"
551+
cp(c, "foo.txt", c, "baz.txt"; async=true)
552+
timeout = 30
553+
tic = time()
554+
while status(c, "baz.txt")["status"] != "success"
555+
if time() - tic > timeout
556+
error("failed async copy")
557+
end
558+
sleep(1)
559+
end
560+
s = status(c, "baz.txt")
551561
rm(c)
552562
end
553563

0 commit comments

Comments
 (0)