need help with unit test and process service factory
michael.meeks at suse.com
Wed Oct 10 12:59:54 PDT 2012
On Wed, 2012-10-10 at 21:15 +0200, Matúš Kukan wrote:
> On 28 September 2012 11:26, Michael Meeks <michael.meeks at suse.com> wrote:
> > If we can create a unit test that doesn't require any of that, it'd be
> > great of course. Having said that, I was not a great fan of the way
> > those unit tests work in the 1st instance with that manual spin the loop
> > <n> times type stuff that is hyper fragile - or did we fix that ?
> Do you mean g_main_context_iteration ?
> It's used both in the real code and unit test.
It shouldn't be used in the real code - we should integrate with the
glib mainloop that is plugged into VCL :-)
> From what I understood, it's how telepathy framework works and it
> can't be avoided.
The problem is a careless use of an iteration; if we ran the mainloop
until an asynchronous callback quit it - that would be -much- less of a
problem :-) The root problem is trying to 2nd guess how many main-loop
iterations to call - which is non documented, non deterministic and
guarenteed to change between minor releases :-)
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice