Commit 55f35da6 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed outdated ownership management for archive jobs in unit test.

The ArchiveRequest ownership at the request level has been deprecated in a preivous commit.
The jobs are now individually owned.
parent 98281aa6
......@@ -368,8 +368,8 @@ TEST(ObjectStore, GarbageCollectorArchiveRequest) {
aFile.fileSize = 667;
aFile.storageClass = "sc";
ar.setArchiveFile(aFile);
ar.addJob(1, "TapePool0", tpAddr[0], 1, 1);
ar.addJob(2, "TapePool1", tpAddr[1], 1, 1);
ar.addJob(1, "TapePool0", agrA.getAgentAddress(), 1, 1);
ar.addJob(2, "TapePool1", agrA.getAgentAddress(), 1, 1);
cta::common::dataStructures::MountPolicy mp;
ar.setMountPolicy(mp);
ar.setArchiveReportURL("");
......@@ -398,6 +398,8 @@ TEST(ObjectStore, GarbageCollectorArchiveRequest) {
std::list <cta::objectstore::ArchiveQueue::JobToAdd> jta;
jta.push_back({jd, ar.getAddressIfSet(), ar.getArchiveFile().archiveFileID, 1000U+pass, policy, time(NULL)});
aq.addJobsAndCommit(jta, agentRef, lc);
ar.setJobOwner(1, aq.getAddressIfSet());
ar.commit();
}
if (pass < 4) { pass++; continue; }
// TODO: partially migrated or selected
......@@ -417,6 +419,8 @@ TEST(ObjectStore, GarbageCollectorArchiveRequest) {
std::list <cta::objectstore::ArchiveQueue::JobToAdd> jta;
jta.push_back({jd, ar.getAddressIfSet(), ar.getArchiveFile().archiveFileID, 1000+pass, policy, time(NULL)});
aq.addJobsAndCommit(jta, agentRef, lc);
ar.setJobOwner(2, aq.getAddressIfSet());
ar.commit();
}
if (pass < 5) { pass++; continue; }
// The step is now deprecated
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment