Skip to content

Commit

Permalink
kv tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubwro committed Feb 3, 2024
1 parent 15ffcf2 commit 6fbb390
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/jetstream/JetStream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export ConsumerConfiguration
export consumer_create, consumer_update, consumer_delete
export consumer_next, consumer_ack

export keyvalue_stream_info, keyvalue_buckets
export keyvalue_stream_create, keyvalue_stream_purge, keyvalue_stream_delete
export keyvalue_get, keyvalue_put, keyvalue_delete, keyvalue_watch
export JetDict, watch, with_optimistic_concurrency
Expand Down
2 changes: 2 additions & 0 deletions test/jetstream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ uint8_vec(s::String) = convert.(UInt8, collect(s))
@testset "Key value - 100 keys" begin
connection = NATS.connect()
kv = JetStream.JetDict{String}(connection, "test_kv")
@test keyvalue_stream_info(connection, "test_kv") isa JetStream.StreamInfo
@test "test_kv" in keyvalue_buckets(connection)
@time @sync for i in 1:100
@async kv["key_$i"] = "value_$i"
end
Expand Down

0 comments on commit 6fbb390

Please sign in to comment.