Opened 11 years ago

Closed 10 years ago

#643 closed defect (fixed)

blocksize1 test needs db.close()

Reported by: Chris Olds Owned by: Olly Betts
Priority: normal Milestone: 1.2.18
Component: Test Suite Version: 1.2.17
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

The blocksize1 test (in core/tests/api_backend.cc) fails on Windows (Server 2008 R2 x64; x64 build, VS2008) because it doesn't close the database.

Adding db.close(); after db.commit(); (line 928 in 1.2.17) fixes the problem.

Change History (1)

comment:1 by Olly Betts, 10 years ago

Milestone: 1.2.18
Resolution: fixed
Status: newclosed

Thanks.

I've fixed this in the 1.2 branch in r18050. I've gone for making the WritableDatabase object have the scope of the loop block, so its destructor gets called at the end of the block, so an explicit close shouldn't be needed. This approach more closely matches how the code already is on trunk, and minimising differences tends to make backporting patches simpler.

This fix should be in 1.2.18.

BTW, a patch file is preferable to trying to describe which lines to change - there are some tips on generating them in this paragraph of HACKING:

http://trac.xapian.org/browser/trunk/xapian-core/HACKING#L1160

Note: See TracTickets for help on using tickets.