[pypy-commit] stmgc c8-hashtable: fix test
arigo
noreply at buildbot.pypy.org
Thu Mar 12 15:45:36 CET 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: c8-hashtable
Changeset: r1726:92ed176fe541
Date: 2015-03-12 15:46 +0100
http://bitbucket.org/pypy/stmgc/changeset/92ed176fe541/
Log: fix test
diff --git a/c8/test/test_hashtable.py b/c8/test/test_hashtable.py
--- a/c8/test/test_hashtable.py
+++ b/c8/test/test_hashtable.py
@@ -297,19 +297,27 @@
h = self.allocate_hashtable()
self.push_root(h)
self.commit_transaction()
+ #
+ self.start_transaction()
h = self.pop_root()
+ self.push_root(h)
+ tl0 = self.tls[self.current_thread]
+ htset(h, 10, stm_allocate(32), tl0)
#
+ self.switch(1)
self.start_transaction()
assert htlen(h) == 0
#
- self.switch(1)
- self.start_transaction()
- tl0 = self.tls[self.current_thread]
- htset(h, 10, stm_allocate(32), tl0)
- py.test.raises(Conflict, self.commit_transaction)
+ self.switch(0)
+ self.commit_transaction()
+ #
+ py.test.raises(Conflict, self.switch, 1)
#
self.switch(0)
+ self.start_transaction()
+ self.pop_root()
stm_major_collect() # to get rid of the hashtable object
+ self.commit_transaction()
def test_grow_without_conflict(self):
self.start_transaction()
More information about the pypy-commit
mailing list