summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-08-30 00:11:32 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-08-30 00:11:32 -0400
commit51c7005dc5cc04a9ed24fbfa290e50df6fb70369 (patch)
treec24d94cf58b9f23e72d8e0685bd87f0b4ed7c869
parent04f0e11051f0f00cbb64dd37dfa287e6173463ba (diff)
downloadsqlalchemy-51c7005dc5cc04a9ed24fbfa290e50df6fb70369.tar.gz
- clean up zoomark a little and try to get new profiles written
-rw-r--r--lib/sqlalchemy/testing/replay_fixture.py15
-rw-r--r--test/aaa_profiling/test_zoomark.py6
-rw-r--r--test/aaa_profiling/test_zoomark_orm.py2
-rw-r--r--test/profiles.txt12
4 files changed, 21 insertions, 14 deletions
diff --git a/lib/sqlalchemy/testing/replay_fixture.py b/lib/sqlalchemy/testing/replay_fixture.py
index b8a0f6df1..b50f52e3d 100644
--- a/lib/sqlalchemy/testing/replay_fixture.py
+++ b/lib/sqlalchemy/testing/replay_fixture.py
@@ -29,9 +29,11 @@ class ReplayFixtureTest(fixtures.TestBase):
self.session = Session(engine)
self.setup_engine()
- self._run_steps(ctx=self._dummy_ctx)
- self.teardown_engine()
- engine.dispose()
+ try:
+ self._run_steps(ctx=self._dummy_ctx)
+ finally:
+ self.teardown_engine()
+ engine.dispose()
player = lambda: dbapi_session.player()
engine = create_engine(
@@ -43,8 +45,11 @@ class ReplayFixtureTest(fixtures.TestBase):
self.session = Session(engine)
self.setup_engine()
- self._run_steps(ctx=profiling.count_functions)
- self.teardown_engine()
+ try:
+ self._run_steps(ctx=profiling.count_functions)
+ finally:
+ self.session.close()
+ engine.dispose()
def setup_engine(self):
pass
diff --git a/test/aaa_profiling/test_zoomark.py b/test/aaa_profiling/test_zoomark.py
index 5b8a0f785..5627ef8e0 100644
--- a/test/aaa_profiling/test_zoomark.py
+++ b/test/aaa_profiling/test_zoomark.py
@@ -22,7 +22,6 @@ class ZooMarkTest(replay_fixture.ReplayFixtureTest):
__only_on__ = 'postgresql+psycopg2'
def _run_steps(self, ctx):
- self._baseline_1_create_tables()
with ctx():
self._baseline_1a_populate()
with ctx():
@@ -37,6 +36,11 @@ class ZooMarkTest(replay_fixture.ReplayFixtureTest):
self._baseline_6_editing()
with ctx():
self._baseline_7_multiview()
+
+ def setup_engine(self):
+ self._baseline_1_create_tables()
+
+ def teardown_engine(self):
self._baseline_8_drop()
def _baseline_1_create_tables(self):
diff --git a/test/aaa_profiling/test_zoomark_orm.py b/test/aaa_profiling/test_zoomark_orm.py
index 500d7c2cb..dece30d65 100644
--- a/test/aaa_profiling/test_zoomark_orm.py
+++ b/test/aaa_profiling/test_zoomark_orm.py
@@ -28,7 +28,6 @@ class ZooMarkTest(replay_fixture.ReplayFixtureTest):
__only_on__ = 'postgresql+psycopg2'
def _run_steps(self, ctx):
- #self._baseline_1_create_tables()
with ctx():
self._baseline_1a_populate()
with ctx():
@@ -41,7 +40,6 @@ class ZooMarkTest(replay_fixture.ReplayFixtureTest):
self._baseline_5_aggregates()
with ctx():
self._baseline_6_editing()
- #self._baseline_7_drop()
def setup_engine(self):
self._baseline_1_create_tables()
diff --git a/test/profiles.txt b/test/profiles.txt
index 4e4a20c07..d9c595f3d 100644
--- a/test/profiles.txt
+++ b/test/profiles.txt
@@ -444,9 +444,9 @@ test.aaa_profiling.test_zoomark.ZooMarkTest.test_invocation 3.4_postgresql_psyco
# TEST: test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation
-test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 2.7_postgresql_psycopg2_cextensions 5908,396,6878,19521,1118,2606
-test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 2.7_postgresql_psycopg2_nocextensions 5999,401,7110,20952,1226,2671
-test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.3_postgresql_psycopg2_cextensions 5816,383,6928,19676,1091,2753
-test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.3_postgresql_psycopg2_nocextensions 5886,388,7032,20703,1177,2659
-test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.4_postgresql_psycopg2_cextensions 6000,386,6716,18339,1091,2630
-test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.4_postgresql_psycopg2_nocextensions 6092,391,6820,19366,1177,2659
+test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 2.7_postgresql_psycopg2_cextensions 6098,399,6666,18183,1118,2606
+test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 2.7_postgresql_psycopg2_nocextensions 6169,404,6898,19614,1226,2671
+test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.3_postgresql_psycopg2_cextensions 6008,386,6716,18339,1091,2630
+test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.3_postgresql_psycopg2_nocextensions 6093,391,6820,19366,1177,2659
+test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.4_postgresql_psycopg2_cextensions 6007,386,6716,18339,1091,2630
+test.aaa_profiling.test_zoomark_orm.ZooMarkTest.test_invocation 3.4_postgresql_psycopg2_nocextensions 6087,391,6820,19366,1177,2659