tests.message: clean up a little bit

This commit is contained in:
torque 2023-08-27 18:11:16 -07:00
parent e2bf69eb31
commit 60632f62ad
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk

View File

@ -1,8 +1,6 @@
const std = @import("std"); const std = @import("std");
const nats = @import("nats");
// const nats = @import("../src/nats.zig"); const nats = @import("nats");
// const message = @import("../src/message.zig");
test "message: create message" { test "message: create message" {
const subject = "hello"; const subject = "hello";
@ -11,7 +9,7 @@ test "message: create message" {
// have to initialize the library so the reference counter can correctly destroy // have to initialize the library so the reference counter can correctly destroy
// objects, otherwise we segfault on trying to free the memory. // objects, otherwise we segfault on trying to free the memory.
try nats.init(-1); try nats.init(nats.default_spin_count);
defer nats.deinit(); defer nats.deinit();
const message = try nats.Message.create(subject, reply, data); const message = try nats.Message.create(subject, reply, data);
@ -28,7 +26,7 @@ test "message: create message" {
} }
test "message: get subject" { test "message: get subject" {
try nats.init(-1); try nats.init(nats.default_spin_count);
defer nats.deinit(); defer nats.deinit();
const subject = "hello"; const subject = "hello";
@ -40,7 +38,7 @@ test "message: get subject" {
} }
test "message: get reply" { test "message: get reply" {
try nats.init(-1); try nats.init(nats.default_spin_count);
defer nats.deinit(); defer nats.deinit();
const subject = "hello"; const subject = "hello";