Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaykm committed Jul 12, 2024
1 parent a544b88 commit b729f4e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/redis_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -378,23 +378,30 @@ function redis_tests(conn = RedisConnection())
@test exec(trans) == ["OK", "foobar"]
@test del(trans, testkey) == "QUEUED"
@test exec(trans) == [true]
@test evalscript(trans, "return", 0, [], []) === nothing
@test evalscript(trans, "return", 0, [], []) == "QUEUED"
@test exec(trans) == [nothing]
disconnect(trans)
end

@testset "Pipelines" begin
pipe = open_pipeline(conn)
set(pipe, testkey3, "anything")
@test length(read_pipeline(pipe)) == 1

get(pipe, testkey3)
set(pipe, testkey4, "testing")
result = read_pipeline(pipe)
@test length(result) == 2
@test result == ["anything", "OK"]

@test del(pipe, testkey3) == 1
@test del(pipe, testkey4) == 2
@test result == ["anything", "OK"]
@test evalscript(pipe, "return", 0, [], []) === nothing
result = read_pipeline(pipe)
@test result == [1, 1]

evalscript(pipe, "return", 0, [], [])
result = read_pipeline(pipe)
@test result == []
disconnect(pipe)
end

Expand Down

0 comments on commit b729f4e

Please sign in to comment.