Skip to content

Commit

Permalink
Improve tests stability for alibuild (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthelemy authored Jul 4, 2019
1 parent 5a43d26 commit be34eab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Framework/test/testCcdbDatabase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ struct test_fixture {
BOOST_AUTO_TEST_CASE(ccdb_create)
{
test_fixture f;

f.backend->truncate("my/task", "*");

}

BOOST_AUTO_TEST_CASE(ccdb_getobjects_name)
Expand All @@ -78,12 +81,15 @@ BOOST_AUTO_TEST_CASE(ccdb_getobjects_name)
}
}

long oldTimestamp;

BOOST_AUTO_TEST_CASE(ccdb_store)
{
test_fixture f;
TH1F* h1 = new TH1F("asdf/asdf", "asdf", 100, 0, 99);
h1->FillRandom("gaus", 10000);
shared_ptr<MonitorObject> mo1 = make_shared<MonitorObject>(h1, "my/task");
oldTimestamp = CcdbDatabase::getCurrentTimestamp();
f.backend->store(mo1);
}

Expand All @@ -100,15 +106,14 @@ BOOST_AUTO_TEST_CASE(ccdb_retrieve, *utf::depends_on("ccdb_store"))
BOOST_AUTO_TEST_CASE(ccdb_retrieve_former_versions, *utf::depends_on("ccdb_store"))
{
// store a new object
long initialTimestamp = CcdbDatabase::getCurrentTimestamp();
test_fixture f;
TH1F* h1 = new TH1F("asdf/asdf", "asdf", 100, 0, 99);
h1->FillRandom("gaus", 10001);
shared_ptr<MonitorObject> mo1 = make_shared<MonitorObject>(h1, "my/task");
f.backend->store(mo1);

// Retrieve old object stored at timestampStorage
MonitorObject* mo = f.backend->retrieve("my/task", "asdf/asdf", initialTimestamp);
MonitorObject* mo = f.backend->retrieve("my/task", "asdf/asdf", oldTimestamp);
BOOST_CHECK_NE(mo, nullptr);
TH1F* old = dynamic_cast<TH1F*>(mo->getObject());
BOOST_CHECK_NE(old, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion Modules/Daq/test/testQcDaq.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(instantiate_task)

// BOOST_CHECK(manager->getMonitorObject("payloadSize")->getObject() != nullptr);

Activity activity;
// Activity activity;
// task.startOfActivity(activity);
// task.startOfCycle();
// auto producer = AliceO2::DataSampling::DataBlockProducer(false, 1024);
Expand Down

0 comments on commit be34eab

Please sign in to comment.