[omniORB] omniORBpy actions on missing servant method

Duncan Grisby duncan at grisby.org
Tue Jan 5 09:53:43 UTC 2021


On Mon, 2021-01-04 at 17:28 -0600, Jim Bell wrote:


> It was the server side I was thinking about.  And jumping through a
> hoop or two for a unit-test's sake would probably be fine. (Like
> making a call to each function in the interface.)
> 
> Does the python caller get the NO_IMPLEMENT only on the unimplemented
> function(s)? Or when the interface is narrowed? (Or other?)

The caller (whether Python or any other language) gets the NO_IMPLEMENT
exception when it calls the missing operation. Any other operations and
narrowing and so on succeed. That's on purpose, because it may be the
case that you are implementing an interface that has operations that
you know will never actually be called on your servant, so you can just
miss them out.

Can you explain what you are actually trying to do with your unit
tests?  Are you trying to write a test that checks that the servant
class has all the methods defined in the IDL?  If so, you can use the
fact that the skeleton class has a member called _omni_op_d that is a
dictionary. The keys of the dictionary are the names of all the IDL
operations it should support.

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list