[Xapian-tickets] [Xapian] #337: Extend test of behaviour of databases after close
Xapian
nobody at xapian.org
Sun Apr 8 05:35:11 BST 2018
#337: Extend test of behaviour of databases after close
--------------------------+------------------------------
Reporter: richard | Owner: gp1308
Type: defect | Status: new
Priority: low | Milestone: 1.4.x
Component: Test Suite | Version: SVN trunk
Severity: normal | Resolution:
Keywords: GoodFirstBug | Blocked By:
Blocking: | Operating System: All
--------------------------+------------------------------
Comment (by olly):
> Understood. I guess now all of the methods are addressed. Let me know if
additional tests needed.
Thanks, will review when I get a chance (probably tomorrow).
> Even though close() is called explicitly here, some other event can
cause a similar effect as `close()` like network error. In such case
`DatabaseError`? or kind of `NetworkError`? raised? (It's a different
matter I guess, just thought of asking).
I don't think we currently have any tests for what happens when the remote
server dies, but it would be good to. And as you suggest the testcases
could be very similar to these. I think we'd just need to add a mechanism
to the test harness to kill the remote server corresponding to a
particular database.
It's harder to test in the non-remote case - I can't see a good way to
force a database error for a local database that's realistic. You could
probably arrange to close all the file descriptors it is using - a bit
artificial, but perhaps is better than not having such tests.
--
Ticket URL: <https://trac.xapian.org/ticket/337#comment:18>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list