From b923f93aee9ded0185f73df633741df37b5ad4ba Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Thu, 25 Sep 2014 17:37:57 +0800 Subject: [PATCH] add testterm --- test/testterm.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/testterm.lua diff --git a/test/testterm.lua b/test/testterm.lua new file mode 100644 index 00000000..6b341ab1 --- /dev/null +++ b/test/testterm.lua @@ -0,0 +1,15 @@ +local skynet = require "skynet" + +local function term() + skynet.error("Sleep one second, and term the call to UNEXIST") + skynet.sleep(100) + local self = skynet.self() + skynet.send(skynet.self(), "debug", "TERM", "UNEXIST") +end + +skynet.start(function() + skynet.fork(term) + skynet.error("call an unexist named service UNEXIST, may block") + pcall(skynet.call, "UNEXIST", "lua", "test") + skynet.error("unblock the unexisted service call") +end)