Commit e06eff7f authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

Merge from branch 02_00_00 (159696:159697)

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/02_00_01@159709 ae0415b3-e90b-0410-900d-d0be9363c56b
parents 1da9976b 07d7a80e
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definitions
orb:loadidlfile("idl/messages.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Broadcaster")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local table = table
local unpack = table.unpack or unpack
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/messages.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......@@ -31,7 +29,7 @@ local services = {}
for _, name in ipairs{"Messenger", "Broadcaster", "Forwarder"} do
-- define service properties
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::"..name)
local props = { unpack(properties),
local props = { table.unpack(properties),
{name="openbus.component.interface",value=iface.repID},
}
-- retrieve service
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table"
local Timer = require "cothread.Timer"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definitions
orb:loadidlfile("idl/messages.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Forwarder")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definitions
orb:loadidlfile("idl/messages.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local table = require "loop.table"
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local table = require "loop.table"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
orb:loadidlfile("idl/hello.idl")
-- load interface definition
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
require "openbus.test.util"
-- setup and start the ORBs
local orb1 = openbus.initORB()
local orb2 = openbus.initORB()
settestcfg(...)
local orb1 = openbus.initORB(orbcfg)
settestcfg(...)
local orb2 = openbus.initORB(orbcfg)
-- load interface definition
orb1:loadidlfile("idl/hello.idl")
orb2:loadidlfile("idl/hello.idl")
local iface = orb1.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext1 = orb1.OpenBusContext
local OpenBusContext2 = orb2.OpenBusContext
......
local openbus = require "openbus"
local idl = require "openbus.core.idl"
local log = require "openbus.util.logger"
local except = require "openbus.util.except"
local openbus = require "openbus"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/mock.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
-- create service implementation
......@@ -50,11 +50,11 @@ end
require "openbus.test.util"
-- setup and start the ORB
local orb = openbus.initORB()
-- customize test configuration for this case
settestcfg(iface, ...)
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB(orbcfg)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local table = require "loop.table"
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- read login private key
local key = assert(openbus.readKeyFile(syskey))
......
local table = require "loop.table"
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local except = require "openbus.util.except"
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
local oil = require "oil"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
local log = require "openbus.util.logger"
local openbus = require "openbus"
local log = require "openbus.util.logger"
local ComponentContext = require "scs.core.ComponentContext"
require "openbus.test.util"
-- customize test configuration for this case
settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB()
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- customize test configuration for this case
settestcfg(iface, ...)
-- get bus context manager
local OpenBusContext = orb.OpenBusContext
......
......@@ -67,7 +67,7 @@ local InvalidTargetCode = loginconst.InvalidTargetCode
local UnknownBusCode = loginconst.UnknownBusCode
local NoLoginCode = loginconst.NoLoginCode
local UnavailableBusCode = loginconst.UnavailableBusCode
local UnavailableBusCode = loginconst.UnavailableBusCode
local UnknownBusCode = loginconst.UnknownBusCode
local oldidl = require "openbus.core.legacy.idl"
local loadoldidl = oldidl.loadto
......@@ -474,7 +474,7 @@ function Interceptor:receiverequest(request, credential)
entity = caller.entity,
delegate = credential.delegate,
})
setNoPermSysEx(request, InvalidCredentialCode)
setNoPermSysEx(request, 0)
else
-- invalid credential, try to reset credetial session
local sessions = self.incomingSessions
......
......@@ -5,9 +5,8 @@ local openbus = require "openbus"
require "openbus.test.configs"
function settestcfg(interface, testname)
local name = interface.name:lower()
if name == "hello" then name = "server" end
function settestcfg(testname, security)
local name = arg[0]:match("(%w+)%.lua$")
local language = "lua"
local domain = "interop_"..testname
system = domain.."_"..language.."_"..name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment