@@ -16,12 +16,12 @@ sleep(60)
1616
1717@testset " Error codes" begin
1818 @test unsafe_load (cglobal ((:N_HTTP_RETRY_CODES , AzStorage. libAzStorage), Cint)) == 2
19- x = unsafe_load (cglobal ((:HTTP_RETRY_CODES , AzStorage. libAzStorage), Ptr{Clong}))
19+ x = Sys . iswindows () ? unsafe_load ( cglobal (( :HTTP_RETRY_CODES , AzStorage . libAzStorage), Ptr{Clonglong})) : unsafe_load (cglobal ((:HTTP_RETRY_CODES , AzStorage. libAzStorage), Ptr{Clong}))
2020 y = unsafe_wrap (Array, x, (2 ,); own= false )
2121 @test y == [500 ,503 ]
2222
2323 @test unsafe_load (cglobal ((:N_CURL_RETRY_CODES , AzStorage. libAzStorage), Cint)) == 5
24- x = unsafe_load (cglobal ((:CURL_RETRY_CODES , AzStorage. libAzStorage), Ptr{Clong}))
24+ x = Sys . iswindows () ? unsafe_load ( cglobal (( :CURL_RETRY_CODES , AzStorage . libAzStorage), Ptr{Clonglong})) : unsafe_load (cglobal ((:CURL_RETRY_CODES , AzStorage. libAzStorage), Ptr{Clong}))
2525 y = unsafe_wrap (Array, x, (5 ,); own= false )
2626 @test y == [6 ,7 ,28 ,55 ,56 ]
2727end
240240 @test _c. storageaccount == storageaccount
241241 @test _c. containername == " foo-$r -k"
242242 @test _c. nretry == 10
243- @test _c. nthreads == 2
243+ if Sys. iswindows ()
244+ @test _c. nthreads == 1
245+ else
246+ @test _c. nthreads == 2
247+ end
244248 rm (c)
245249end
246250
478482 rm (c)
479483end
480484
481- @testset " Container,Object, copy blob to blob" begin sleep (1 )
485+ @testset " Container,Object, copy blob to blob" begin
486+ sleep (1 )
482487 r = lowercase (randstring (MersenneTwister (millisecond (now ())+ 33 )))
483488 c = AzContainer (" foo-$r -o" , storageaccount= storageaccount, session= session, nthreads= 2 , nretry= 10 )
484489 mkpath (c)
487492 @test read (open (c, " bar.txt" ), String) == " Hello world"
488493 rm (c)
489494end
495+
496+ @testset " Windows, single thread check" begin
497+ sleep (1 )
498+ r = lowercase (randstring (MersenneTwister (millisecond (now ())+ 34 )))
499+ container = AzContainer (" foo-$r .o" , storageaccount= storageaccount, session= session, nthreads= 2 , nretry= 10 )
500+ if Sys. iswindows ()
501+ @test container. nthreads == 1
502+ else
503+ @test container. nthreads == 2
504+ end
505+ end
0 commit comments