And it is really only sent once. The problem was in the test-dbus.py
script. Here's the fix and a more detailed explanation:
When sync is done,
signals of statusChanged and progressChanged should
be never sent. If has, I think it should be bugs of dbus server.
I doubt why we need this kind of checking.
Yongsheng, I pushed this and a fix for sending SYNC_DONE at the end
of
Session::run() into "pohly". Please review.
It's ok. I'm refining
patches for test-dbus.py according to your comments.
To avoid conflicts, so I'll do below issues:
removing redundant clean configs, setupFiles, add test for GetReports with reference
directory tree.
Cheers,
Yongsheng
> -----Original Message-----
> From: syncevolution-bounces(a)syncevolution.org
> [mailto:syncevolution-bounces@syncevolution.org] On Behalf Of Patrick Ohly
> Sent: Thursday, November 19, 2009 5:11 PM
> To: SyncEvolution
> Subject: Re: [SyncEvolution] D-Bus Testing + TestSessionAPIsReal +
> StatusChanged "done" multiple times
>
> On Wed, 2009-11-18 at 18:58 +0100, Patrick Ohly wrote:
> > I'm also still looking at why the "done" signal is sent more than
once.
> > I think that shouldn't happen.
>
And it is really only sent once. The problem was in the test-dbus.py
script. Here's the fix and a more detailed explanation:
>
> commit ac1c3c032ccae55f8697f75341f7becd2c3adfb0
> Author: Patrick Ohly <patrick.ohly(a)intel.com>
> Date: Wed Nov 18 22:49:48 2009 +0100
>
> D-Bus testing: only react to D-Bus signals while the test runs
>
> Registered Python D-Bus signal handlers cannot be removed.
> This had the undesired effect that when running multiple tests,
> old signal handlers where still active and might have undesired
> effects, like calling loop.quit() or recording events multiple
> times (because both the old and new handler are invoked).
>
> To solve this problem, DBusUtil.runTest() sets self.running = True
> while the test is active. All signal handlers must check this
> flag and not do anything if it is False.
>
> Debugging such problems was harder than necessary because recording
> the "quit_events" inside DBusUtil instances had the effect that the
> records of previous signal handlers where not visible in the ensuing,
> failing test.
>
> Therefore this patch also turns the DBusUtil instance variables into
> class variables which are shared by the tests. As a side effect, it is
> no longer necessary to call DBusUtil.__init__. Instead the variables
> are reset in runTest().
>
Yongsheng, I pushed this and a fix for sending SYNC_DONE at the end
of
Session::run() into "pohly". Please review.
>
>
> --
> Best Regards, Patrick Ohly
>
> The content of this message is my personal opinion only and although
> I am an employee of Intel, the statements I make here in no way
> represent Intel's position on the issue, nor am I authorized to speak
> on behalf of Intel on this matter.
>
>
> _______________________________________________
> SyncEvolution mailing list
> SyncEvolution(a)syncevolution.org
>
http://lists.syncevolution.org/listinfo/syncevolution