Merge lp:~cjwatson/storm/avoid-test-droppings into lp:storm

Proposed by Colin Watson
Status: Merged
Merged at revision: 502
Proposed branch: lp:~cjwatson/storm/avoid-test-droppings
Merge into: lp:storm
Diff against target: 25 lines (+4/-4)
1 file modified
tests/zope/zstorm.py (+4/-4)
To merge this branch: bzr merge lp:~cjwatson/storm/avoid-test-droppings
Reviewer Review Type Date Requested Status
Simon Poirier (community) Approve
Review via email: mp+368456@code.launchpad.net

Commit message

Stop ZStormTest leaving files in the current directory.

Description of the change

This has been annoying me for ages, and I finally got round to hunting it down with strace.

To post a comment you must log in.
Revision history for this message
Simon Poirier (simpoir) wrote :

👍

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/zope/zstorm.py'
2--- tests/zope/zstorm.py 2019-06-05 11:41:07 +0000
3+++ tests/zope/zstorm.py 2019-06-06 12:06:11 +0000
4@@ -181,8 +181,8 @@
5 Two stores in two-phase-commit mode joining the same transaction share
6 the same global transaction ID.
7 """
8- self.zstorm.set_default_uri("name1", "sqlite:1")
9- self.zstorm.set_default_uri("name2", "sqlite:2")
10+ self.zstorm.set_default_uri("name1", "sqlite:///%s" % self.makeFile())
11+ self.zstorm.set_default_uri("name2", "sqlite:///%s" % self.makeFile())
12 self.zstorm.set_default_tpc("name1", True)
13 self.zstorm.set_default_tpc("name2", True)
14 store1 = self.zstorm.get("name1")
15@@ -236,8 +236,8 @@
16 to actually achieve two-phase commit behavior when only one store
17 doesn't support TPC.
18 """
19- self.zstorm.set_default_uri("name1", "sqlite:1")
20- self.zstorm.set_default_uri("name2", "sqlite:2")
21+ self.zstorm.set_default_uri("name1", "sqlite:///%s" % self.makeFile())
22+ self.zstorm.set_default_uri("name2", "sqlite:///%s" % self.makeFile())
23 self.zstorm.set_default_tpc("name1", True)
24 self.zstorm.set_default_tpc("name2", False)
25 store1 = self.zstorm.get("name1")

Subscribers

People subscribed via source and target branches

to status/vote changes: