From: Mike Bayer Date: Sat, 30 Aug 2014 04:11:32 +0000 (-0400) Subject: - clean up zoomark a little and try to get new profiles written X-Git-Tag: rel_1_0_0b1~205^2~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51c7005dc5cc04a9ed24fbfa290e50df6fb70369;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - clean up zoomark a little and try to get new profiles written --- diff --git a/lib/sqlalchemy/testing/replay_fixture.py b/lib/sqlalchemy/testing/replay_fixture.py index b8a0f6df1a..b50f52e3de 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 5b8a0f7853..5627ef8e07 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 500d7c2cb1..dece30d659 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 4e4a20c070..d9c595f3da 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