dbus-test: behavioral uncertainty

Matthew Johnson dbus at matthew.ath.cx
Mon Feb 5 03:20:30 PST 2007


On Fri, 2 Feb 2007, Kevin Krammer wrote:

> I am working on an implementation of the dbus-test interface for the Qt3
> bindings and I am testing against libdbus-java-1.13

Cool, I'm happy to see more bindings implementing the tests. I know I
found a bunch of bugs through them. Can I download the bindings and
tests anywhere to try running them? There are also tests for the python
binding as well.

> When testing my client against the Java server, the client successfully calls
> all methods (currently just once, still need to work on test cases), however
> the server complains about not receiving signal Trigger.
>
> This is kind of contrary to how I interpreted the introspection file, which
> has Triggered and Trigger in the same interface and since Triggered is being
> sent by the server as a reaction to a method call, I understood that Trigger
> would be sent by the server to generate a method call on its initiative.

The behavior I intended and implemented in Java was as follows:

Client            Server
--------------------------
MethodCall -------->
        <---------- Triggered
Trigger ----------->
        <---------- Callback

This may, on reflection, be unclear (although I though the accompanying
documentation explained it). I would have no objection to changing the
interfaces around to be clearer.

> Assuming that the Java test behavior is correct (AFAIK same developer as the
> test), I suggest to move signal Trigger to its own interface and either
> document that this signal interface and interface TestCallbacks are supposed
> to be implemented on the client, also on path "/Test", or move them to a
> second xml file which describes the client's interface.

That would probably be sensible. Feel free to send patches if someone
gets round to it before me.

Matt
-- 
Matthew Johnson
http://www.matthew.ath.cx/


More information about the dbus mailing list