summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/locks
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-05 22:20:07 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-05 22:20:07 -0700
commite9ea4bc74f16e6c120fdf9c1926dfcb7de7bd135 (patch)
treea18dc9f2e936f799bf91afcf3d554b453f7ac4e4 /pym/portage/tests/locks
parent14230dd467c4f0136cb99e83f2d610de166b772b (diff)
downloadportage-e9ea4bc74f16e6c120fdf9c1926dfcb7de7bd135.tar.gz
portage-e9ea4bc74f16e6c120fdf9c1926dfcb7de7bd135.tar.bz2
portage-e9ea4bc74f16e6c120fdf9c1926dfcb7de7bd135.zip
Substitute EventLoop for PollScheduler.
EventLoop suffices for all of these cases. EventLoop(main=False) is used for thread safety where API consumers may be using threads.
Diffstat (limited to 'pym/portage/tests/locks')
-rw-r--r--pym/portage/tests/locks/test_asynchronous_lock.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/portage/tests/locks/test_asynchronous_lock.py b/pym/portage/tests/locks/test_asynchronous_lock.py
index 49dd10ec4..3a2ccfb84 100644
--- a/pym/portage/tests/locks/test_asynchronous_lock.py
+++ b/pym/portage/tests/locks/test_asynchronous_lock.py
@@ -7,13 +7,13 @@ import tempfile
from portage import os
from portage import shutil
from portage.tests import TestCase
+from portage.util._eventloop.global_event_loop import global_event_loop
from _emerge.AsynchronousLock import AsynchronousLock
-from _emerge.PollScheduler import PollScheduler
class AsynchronousLockTestCase(TestCase):
def _testAsynchronousLock(self):
- scheduler = PollScheduler().sched_iface
+ scheduler = global_event_loop()
tempdir = tempfile.mkdtemp()
try:
path = os.path.join(tempdir, 'lock_me')
@@ -53,7 +53,7 @@ class AsynchronousLockTestCase(TestCase):
os.environ["__PORTAGE_TEST_HARDLINK_LOCKS"] = prev_state
def _testAsynchronousLockWait(self):
- scheduler = PollScheduler().sched_iface
+ scheduler = global_event_loop()
tempdir = tempfile.mkdtemp()
try:
path = os.path.join(tempdir, 'lock_me')
@@ -94,7 +94,7 @@ class AsynchronousLockTestCase(TestCase):
os.environ["__PORTAGE_TEST_HARDLINK_LOCKS"] = prev_state
def _testAsynchronousLockWaitCancel(self):
- scheduler = PollScheduler().sched_iface
+ scheduler = global_event_loop()
tempdir = tempfile.mkdtemp()
try:
path = os.path.join(tempdir, 'lock_me')
@@ -132,7 +132,7 @@ class AsynchronousLockTestCase(TestCase):
os.environ["__PORTAGE_TEST_HARDLINK_LOCKS"] = prev_state
def _testAsynchronousLockWaitKill(self):
- scheduler = PollScheduler().sched_iface
+ scheduler = global_event_loop()
tempdir = tempfile.mkdtemp()
try:
path = os.path.join(tempdir, 'lock_me')