[Xapian-devel] Re: [Xapian-commits]7990: trunk/xapian-core/trunk/xapian-core/bin/trunk/xapian-core/tests/harness/

Olly Betts olly at survex.com
Sun Apr 1 15:50:53 BST 2007

On Mon, Apr 02, 2007 at 12:05:44AM +1000, Mark Hammond wrote:
> Richard writes:
> > I've got everything working again on
> > Linux - let us know how you do on windows.
> It's all working fine for me - thanks!  I've a few outstanding patches from
> xapian-maintainer-tools/win32msvc, but I'll add them to bugzilla over the
> next few days.

Interesting - does "make check" currently pass for you under MSVC?

I found that the WinsockInitializer mechanism just didn't work as
it currently is in SVN for TcpClient because the TcpClient constructor
creates the socket and passes it to initialise the parent class which
happens before the winsock_initializer member is initialised.

I've fixed this in my working copy by making the WinsockInitializer a
base class of TcpClient (and listing it before RemoteDatabase) and then
winsock gets initialised as intended.

Perhaps MSVC has a different class construction order, though I thought
this was mandated by the C++ standard.  Anyway, the base class approach
should work for MSVC too.  Essentially WinsockInitializer is now a
"mixin" class.

The testsuite now sort of works for mingw (with various tweaks that I
still need to tidy up and check in).

The problem is that tests seem to randomly fail to connect to the remote
backend, which I think must be down to timing issues with starting
xapian-tcpsrv versus trying to connect to it.  Under Unix we carefully
wait until xapian-tcpsrv outputs "Listening" to avoid this problem.
Perhaps adding a short "sleep" after starting xapian-tcpsrv will provide
an acceptable workaround.


More information about the Xapian-devel mailing list