Skip to content

Commit

Permalink
test: add test for unknown unsub topic
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Feb 27, 2017
1 parent 790ac5b commit aaf2d26
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions t/lua/t0003-events.t
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env lua
--
-- Basic flux reactor testing using ping interface to kvs
-- Basic flux event testing
--
local test = require 'fluxometer'.init (...)
test:start_session {}

local fmt = string.format

plan (20)
plan (22)

local flux = require_ok ('flux')
local f, err = flux.new()
Expand All @@ -18,6 +18,11 @@ local rc, err = f:subscribe ("testevent.")
isnt (rc, -1, "subscribe: return code >= 0")
is (err, nil, "subscribe: error is nil")

local rc, err = f:unsubscribe ("notmytopic")
is (rc, nil, "unsubscribe: return code == nil")
is (err, "No such file or directory",
"unsubscribe: error is No such file or directory")

local rc, err = f:sendevent ({ test = "xxx" }, "testevent.1")
isnt (rc, -1, "sendevent: return code >= 0")
is (err, nil, "sendevent: error is nil")
Expand Down

0 comments on commit aaf2d26

Please sign in to comment.