diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-12-15 16:25:56 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-12-15 16:56:41 +0000 |
commit | ee8072e7d5a267dd8e2ea80a1b1afdeb0ca8d071 (patch) | |
tree | 072af9b85faf22c4bce8f5e6d1f3e8230af6d112 | |
parent | Make EntityWhereFilter a template (diff) | |
download | gentoobrowse-api-ee8072e7d5a267dd8e2ea80a1b1afdeb0ca8d071.tar.bz2 gentoobrowse-api-ee8072e7d5a267dd8e2ea80a1b1afdeb0ca8d071.tar.xz gentoobrowse-api-ee8072e7d5a267dd8e2ea80a1b1afdeb0ca8d071.zip |
Dump DB before doing assertions so you have some hope of diagnosing problems
-rw-r--r-- | gentoobrowse-api/unittests/testMaintenance.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gentoobrowse-api/unittests/testMaintenance.cpp b/gentoobrowse-api/unittests/testMaintenance.cpp index 6439923..e77837f 100644 --- a/gentoobrowse-api/unittests/testMaintenance.cpp +++ b/gentoobrowse-api/unittests/testMaintenance.cpp @@ -38,6 +38,8 @@ class SampleData { BOOST_FIXTURE_TEST_SUITE(tp, TestClient) +void dumpDb(DB::ConnectionPtr db); + void doRefreshPackageTree(SampleData & sd, DB::ConnectionPtr db, const std::string & archive, const std::string & dir, Gentoo::MaintenancePrx m, int64_t files, int64_t cats, int64_t devvcs, int64_t pkgs, int64_t ebs, int64_t ebus, @@ -49,6 +51,7 @@ doRefreshPackageTree(SampleData & sd, DB::ConnectionPtr db, const std::string & } m->refreshPackageTree(); sd.clean(); + dumpDb(db); SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.files", int64_t, files); SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.categories", int64_t, cats); @@ -102,11 +105,9 @@ BOOST_AUTO_TEST_CASE( refreshPackageTree ) doRefreshPackageTree(sd, db, "4156eb45cf3b0ce1d7125b84efd8688c2d6e831d", "gentoo", m, 2080, 5, 1, 482, 981, 3626, 4593, 501, 393, 238, 50, 1573, 2008, 1543, 81, 152); - dumpDb(db); doRefreshPackageTree(sd, db, "756569aa764177340726dd3d40b41d89b11b20c7", "gentoo", m, 2083, 5, 1, 484, 982, 3638, 4599, 503, 393, 238, 50, 1573, 2009, 1546, 79, 152); - dumpDb(db); doRefreshPackageTree(sd, db, "", "gentoo", m, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |