Commit cf52dde8 authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Fixed 1 more test cases of castor_tape_tapeserver_daemon_DataTransferSessionTest

parent b0b1e70d
......@@ -146,14 +146,26 @@ void cta::objectstore::ArchiveToFileRequest::setAllJobsPendingNSdeletion() {
}
void cta::objectstore::ArchiveToFileRequest::setArchiveFile(
const std::string& archiveFile) {
const cta::ArchiveFile& archiveFile) {
checkPayloadWritable();
m_payload.set_archivefile(archiveFile);
auto *af = m_payload.mutable_archivefile();
af->set_checksum(archiveFile.checksum);
af->set_fileid(archiveFile.fileId);
af->set_lastmodificationtime(archiveFile.lastModificationTime);
af->set_nshostname(archiveFile.nsHostName);
af->set_path(archiveFile.path);
af->set_size(archiveFile.size);
}
std::string cta::objectstore::ArchiveToFileRequest::getArchiveFile() {
cta::ArchiveFile cta::objectstore::ArchiveToFileRequest::getArchiveFile() {
checkPayloadReadable();
return m_payload.archivefile();
auto checksum = m_payload.archivefile().checksum();
auto fileId = m_payload.archivefile().fileid();
auto lastModificationTime = m_payload.archivefile().lastmodificationtime();
auto nsHostName = m_payload.archivefile().nshostname();
auto path = m_payload.archivefile().path();
auto size = m_payload.archivefile().size();
return ArchiveFile{path, nsHostName, fileId, size, checksum, lastModificationTime};
}
......@@ -251,7 +263,7 @@ void cta::objectstore::ArchiveToFileRequest::garbageCollect(const std::string &p
jd.tapePool = j->tapepool();
jd.tapePoolAddress = j->tapepooladdress();
if (tp.addJobIfNecessary(jd, getAddressIfSet(),
m_payload.archivefile(), m_payload.remotefile().size()))
m_payload.archivefile().path(), m_payload.remotefile().size()))
tp.commit();
j->set_status(serializers::AJS_PendingMount);
commit();
......@@ -275,7 +287,7 @@ void cta::objectstore::ArchiveToFileRequest::garbageCollect(const std::string &p
jd.tapePool = j->tapepool();
jd.tapePoolAddress = j->tapepooladdress();
if (tp.addOrphanedJobPendingNsCreation(jd, getAddressIfSet(),
m_payload.archivefile(), m_payload.remotefile().size()))
m_payload.archivefile().path(), m_payload.remotefile().size()))
tp.commit();
} catch (...) {
j->set_status(serializers::AJS_Failed);
......@@ -297,7 +309,7 @@ void cta::objectstore::ArchiveToFileRequest::garbageCollect(const std::string &p
jd.tapePool = j->tapepool();
jd.tapePoolAddress = j->tapepooladdress();
if (tp.addOrphanedJobPendingNsCreation(jd, getAddressIfSet(),
m_payload.archivefile(), m_payload.remotefile().size()))
m_payload.archivefile().path(), m_payload.remotefile().size()))
tp.commit();
j->set_status(serializers::AJS_PendingMount);
commit();
......
......@@ -20,6 +20,7 @@
#include "ObjectOps.hpp"
#include "objectstore/cta.pb.h"
#include "common/archiveNS/ArchiveFile.hpp"
#include "common/remoteFS/RemotePathAndStatus.hpp"
#include <list>
......@@ -66,8 +67,8 @@ public:
void setSuccessful();
void setFailed();
// ===========================================================================
void setArchiveFile(const std::string & archiveFile);
std::string getArchiveFile();
void setArchiveFile(const cta::ArchiveFile & archiveFile);
cta::ArchiveFile getArchiveFile();
void setRemoteFile (const RemotePathAndStatus & remoteFile);
cta::RemotePathAndStatus getRemoteFile();
void setPriority (uint64_t priority);
......
......@@ -34,8 +34,9 @@ TEST(ObjectStore, ArchiveToFileRequestBasicAccess) {
{
// Try to create the ArchiveToFileRequest entry
cta::objectstore::ArchiveToFileRequest atfr(tapeAddress, be);
atfr.initialize();
atfr.setArchiveFile("cta://dir/file");
atfr.initialize();cta::ArchiveFile af;
af.path = "cta://dir/file";
atfr.setArchiveFile(af);
atfr.setRemoteFile(cta::RemotePathAndStatus(cta::RemotePath("eos://dir2/file2"),
cta::RemoteFileStatus(cta::UserIdentity(123,456), 0744, 12345678)));
atfr.setCreationLog(cta::CreationLog(cta::UserIdentity(123,456),"testHost",
......@@ -48,7 +49,7 @@ TEST(ObjectStore, ArchiveToFileRequestBasicAccess) {
cta::objectstore::ArchiveToFileRequest atfr(tapeAddress, be);
cta::objectstore::ScopedSharedLock atfrl(atfr);
atfr.fetch();
ASSERT_EQ("cta://dir/file", atfr.getArchiveFile());
ASSERT_EQ("cta://dir/file", atfr.getArchiveFile().path);
ASSERT_EQ("eos://dir2/file2", atfr.getRemoteFile().path.getRaw());
ASSERT_EQ(12345678, atfr.getRemoteFile().status.size);
cta::objectstore::CreationLog log(atfr.getCreationLog());
......
......@@ -306,7 +306,9 @@ TEST(ObjectStore, GarbageCollectorArchiveToFileRequest) {
// further or cancelled, depending on the NS status.
cta::objectstore::ArchiveToFileRequest atfr(atfrAddr, be);
atfr.initialize();
atfr.setArchiveFile("cta:/file");
cta::ArchiveFile af;
af.path = "cta:/file";
atfr.setArchiveFile(af);
atfr.setRemoteFile(cta::RemotePathAndStatus(cta::RemotePath("eos:/file"),
cta::RemoteFileStatus(cta::UserIdentity(123,456), 0744, 1000+pass)));
atfr.setPriority(0);
......@@ -336,7 +338,7 @@ TEST(ObjectStore, GarbageCollectorArchiveToFileRequest) {
jd.copyNb = 1;
jd.tapePool = "TapePool0";
jd.tapePoolAddress = tpAddr[0];
tp.addJob(jd, atfr.getAddressIfSet(), atfr.getArchiveFile(), 1000+pass, 0, time(NULL));
tp.addJob(jd, atfr.getAddressIfSet(), atfr.getArchiveFile().path, 1000+pass, 0, time(NULL));
tp.commit();
}
if (pass < 4) { pass++; continue; }
......@@ -350,7 +352,7 @@ TEST(ObjectStore, GarbageCollectorArchiveToFileRequest) {
jd.copyNb = 2;
jd.tapePool = "TapePool1";
jd.tapePoolAddress = tpAddr[1];
tp.addJob(jd, atfr.getAddressIfSet(), atfr.getArchiveFile(), 1000+pass, 0, time(NULL));
tp.addJob(jd, atfr.getAddressIfSet(), atfr.getArchiveFile().path, 1000+pass, 0, time(NULL));
tp.commit();
}
if (pass < 5) { pass++; continue; }
......
......@@ -265,6 +265,15 @@ message Tape {
required CreationLog log = 4318;
}
message ArchiveFile {
required string path = 4350;
required string nsHostName = 4351;
required uint64 fileId = 4352;
required uint64 size = 4353;
required uint32 checksum = 4354;
required uint64 lastModificationTime = 4355;
}
// ------------- Archive Jobs --------------------------------------------------
// The status of the individual archive jobs. The jobs are materialised
......@@ -303,7 +312,7 @@ message ArchiveJobEntry {
message ArchiveToFileRequest {
required FilePathAndStatus remotefile = 4500;
required string archivefile = 4501;
required ArchiveFile archivefile = 4501;
repeated ArchiveJobEntry jobs = 4502;
required uint64 priority = 4503;
required CreationLog log = 4504;
......@@ -342,15 +351,6 @@ message RetrieveJobEntry {
required uint32 retrieswithinmount = 4707;
}
message ArchiveFile {
required string path = 4750;
required string nsHostName = 4751;
required uint64 fileId = 4752;
required uint64 size = 4753;
required uint32 checksum = 4754;
required uint64 lastModificationTime = 4755;
}
message RetrieveToFileRequest {
required string remotefile = 4800;
required ArchiveFile archivefile = 4801;
......
......@@ -64,12 +64,10 @@ void cta::ArchiveJob::complete() {
// failed
//------------------------------------------------------------------------------
void cta::ArchiveJob::failed(const cta::exception::Exception &ex) {
throw NotImplemented("");
}
//------------------------------------------------------------------------------
// retry
//------------------------------------------------------------------------------
void cta::ArchiveJob::retry() {
throw NotImplemented("");
}
......@@ -49,35 +49,32 @@ cta::MountType::Enum cta::ArchiveMount::getMountType() const {
// getVid
//------------------------------------------------------------------------------
std::string cta::ArchiveMount::getVid() const {
throw exception::Exception("UNKNOWN_VID_FOR_ARCHIVE_MOUNT");
return m_dbMount->mountInfo.vid;
}
//------------------------------------------------------------------------------
// getDensity
//------------------------------------------------------------------------------
std::string cta::ArchiveMount::getDensity() const {
throw exception::Exception("UNKNOWN_DENSITY_FOR_ARCHIVE_MOUNT");
return m_dbMount->mountInfo.density;
}
//------------------------------------------------------------------------------
// getPoolName
//------------------------------------------------------------------------------
std::string cta::ArchiveMount::getPoolName() const {
throw exception::Exception("UNKNOWN_POOL_FOR_ARCHIVE_MOUNT");
}
//------------------------------------------------------------------------------
// getCopyNumber
//------------------------------------------------------------------------------
int cta::ArchiveMount::getCopyNumber() const {
throw exception::Exception("UNKNOWN_COPY_NUMBER_ARCHIVE_MOUNT");
return m_dbMount->mountInfo.tapePool;
}
//------------------------------------------------------------------------------
// getMountTransactionId
//------------------------------------------------------------------------------
std::string cta::ArchiveMount::getMountTransactionId() const {
throw exception::Exception("UNKNOWN_MOUNTTRANSACTIONID_FOR_ARCHIVE_MOUNT");
std::stringstream id;
if (!m_dbMount.get())
throw exception::Exception("In cta::ArchiveMount::getMountTransactionId(): got NULL dbMount");
id << m_dbMount->mountInfo.mountId;
return id.str();
}
//------------------------------------------------------------------------------
......
......@@ -108,13 +108,6 @@ namespace cta {
*/
virtual std::string getPoolName() const;
/**
* Returns the copy number of the tape to be mounted.
*
* @return The copy number of the tape to be mounted.
*/
virtual int getCopyNumber() const;
/**
* Destructor.
*/
......
......@@ -35,7 +35,7 @@ cta::ArchiveToFileRequest::~ArchiveToFileRequest() throw() {
//------------------------------------------------------------------------------
cta::ArchiveToFileRequest::ArchiveToFileRequest(
const RemotePathAndStatus &remoteFile,
const std::string &archiveFile,
const cta::ArchiveFile &archiveFile,
const std::map<uint16_t, std::string> &copyNbToPoolMap,
const uint64_t priority,
const CreationLog & creationLog):
......
......@@ -18,6 +18,7 @@
#pragma once
#include "common/archiveNS/ArchiveFile.hpp"
#include "common/remoteFS/RemotePathAndStatus.hpp"
#include "scheduler/ArchiveRequest.hpp"
#include "SchedulerDatabase.hpp"
......@@ -61,7 +62,7 @@ struct ArchiveToFileRequest: public ArchiveRequest {
* Constructor.
*
* @param remoteFile The path and status of the remote file to be archived.
* @param archiveFile The full path of the destination archive file.
* @param archiveFile The destination archive file.
* @param remoteFileStatus The status gotten from stat-ing the remote file.
* @param copyNbToPoolMap The mapping from archive copy number to destination
* tape pool.
......@@ -70,7 +71,7 @@ struct ArchiveToFileRequest: public ArchiveRequest {
*/
ArchiveToFileRequest(
const RemotePathAndStatus &remoteFilePath,
const std::string &archiveFile,
const cta::ArchiveFile &archiveFile,
const std::map<uint16_t, std::string> &copyNbToPoolMap,
const uint64_t priority,
const CreationLog & creationLog);
......@@ -81,9 +82,9 @@ struct ArchiveToFileRequest: public ArchiveRequest {
RemotePathAndStatus remoteFile;
/**
* The full path of the source archive file.
* The destination archive file.
*/
std::string archiveFile;
cta::ArchiveFile archiveFile;
/**
* The mapping from archive copy number to destination tape pool.
......
......@@ -387,7 +387,7 @@ void OStoreDB::ArchiveToFileRequestCreation::complete() {
if (tp.getOwner() != re.getAddressIfSet())
throw NoSuchTapePool("In OStoreDB::queue: non-existing tape pool found "
"(dangling pointer): cancelling request creation.");
tp.addJob(*j, m_request.getAddressIfSet(), m_request.getArchiveFile(),
tp.addJob(*j, m_request.getAddressIfSet(), m_request.getArchiveFile().path,
m_request.getRemoteFile().status.size, m_request.getPriority(),
m_request.getCreationLog().time);
// Now that we have the tape pool handy, get the retry limits from it and
......@@ -743,7 +743,7 @@ void OStoreDB::deleteArchiveRequest(const SecurityIdentity& requester,
objectstore::ArchiveToFileRequest atfr(ajp->address, m_objectStore);
ScopedSharedLock atfrl(atfr);
atfr.fetch();
if (atfr.getArchiveFile() == archiveFile) {
if (atfr.getArchiveFile().path == archiveFile) {
atfrl.release();
objectstore::ScopedExclusiveLock al(*m_agent);
m_agent->fetch();
......@@ -799,7 +799,7 @@ std::unique_ptr<SchedulerDatabase::ArchiveToFileRequestCancelation>
objectstore::ArchiveToFileRequest tatfr(arp->address, m_objectStore);
objectstore::ScopedSharedLock tatfrl(tatfr);
tatfr.fetch();
if (tatfr.getArchiveFile() == archiveFile) {
if (tatfr.getArchiveFile().path == archiveFile) {
// Point the agent to the request
ScopedExclusiveLock agl(*m_agent);
m_agent->fetch();
......@@ -894,7 +894,7 @@ std::map<cta::TapePool, std::list<ArchiveToTapeCopyRequest> >
if (!copyndFound) continue;
ret[tp].push_back(cta::ArchiveToTapeCopyRequest(
osar.getRemoteFile(),
osar.getArchiveFile(),
osar.getArchiveFile().path,
copynb,
tpp->tapePool,
osar.getPriority(),
......@@ -940,7 +940,7 @@ std::list<ArchiveToTapeCopyRequest>
if (!copyndFound) continue;
ret.push_back(cta::ArchiveToTapeCopyRequest(
osar.getRemoteFile(),
osar.getArchiveFile(),
osar.getArchiveFile().path,
copynb,
tpp->tapePool,
osar.getPriority(),
......@@ -1395,7 +1395,7 @@ auto OStoreDB::ArchiveMount::getNextJob() -> std::unique_ptr<SchedulerDatabase::
// We can commit and release the tape pool lock, we will only fill up
// memory structure from here on.
tp.commit();
privateRet->archiveFile.path = privateRet->m_atfr.getArchiveFile();
privateRet->archiveFile = privateRet->m_atfr.getArchiveFile();
privateRet->remoteFile = privateRet->m_atfr.getRemoteFile();
privateRet->nameServerTapeFile.tapeFileLocation.fSeq = m_nextFseq++;
privateRet->nameServerTapeFile.tapeFileLocation.copyNb = privateRet->m_copyNb;
......@@ -1583,7 +1583,7 @@ void OStoreDB::ArchiveJob::fail() {
auto jl = m_atfr.dumpJobs();
for (auto j=jl.begin(); j!=jl.end(); j++) {
if (j->copyNb == m_copyNb) {
tp.addJobIfNecessary(*j, m_atfr.getAddressIfSet(), m_atfr.getArchiveFile(), m_atfr.getRemoteFile().status.size);
tp.addJobIfNecessary(*j, m_atfr.getAddressIfSet(), m_atfr.getArchiveFile().path, m_atfr.getRemoteFile().status.size);
tp.commit();
tplock.release();
// We have a pointer to the job, we can change the job ownership
......
......@@ -665,45 +665,62 @@ void cta::Scheduler::queueArchiveToFileRequest(
const std::string &archiveFile) {
const uint64_t priority = 0; // TO BE DONE
const ArchiveToFileRequest rqst = createArchiveToFileRequest(requester,
remoteFile, archiveFile, priority);
std::unique_ptr<SchedulerDatabase::ArchiveToFileRequestCreation>
requestCreation (m_db.queue(rqst));
try {
m_ns.createFile(requester, rqst.archiveFile, remoteFile.status.mode, remoteFile.status.size);
} catch(std::exception &nsEx) {
// Try our best to cleanup the scheduler database. The garbage collection
// logic will try again if we fail.
try {
requestCreation->cancel();
//m_db.deleteArchiveRequest(requester, rqst.archiveFile);
} catch(...) {
}
// Whether or not we were able to clean up the scheduler database, the real
// problem here was the failure to create an entry in the NS
throw nsEx;
}
m_ns.createFile(requester, archiveFile, remoteFile.status.mode, remoteFile.status.size);
const ArchiveToFileRequest rqst = createArchiveToFileRequest(requester, remoteFile, archiveFile, priority);
std::unique_ptr<SchedulerDatabase::ArchiveToFileRequestCreation> requestCreation(m_db.queue(rqst));
requestCreation->complete();
}
//------------------------------------------------------------------------------
// queueArchiveToFileRequest
//------------------------------------------------------------------------------
//void cta::Scheduler::queueArchiveToFileRequest(
// const SecurityIdentity &requester,
// const RemotePathAndStatus &remoteFile,
// const std::string &archiveFile) {
//
// const uint64_t priority = 0; // TO BE DONE
// const ArchiveToFileRequest rqst = createArchiveToFileRequest(requester,
// remoteFile, archiveFile, priority);
//
// std::unique_ptr<SchedulerDatabase::ArchiveToFileRequestCreation>
// requestCreation (m_db.queue(rqst));
// try {
// m_ns.createFile(requester, rqst.archiveFile.path, remoteFile.status.mode, remoteFile.status.size);
// } catch(std::exception &nsEx) {
// // Try our best to cleanup the scheduler database. The garbage collection
// // logic will try again if we fail.
// try {
// requestCreation->cancel();
// //m_db.deleteArchiveRequest(requester, rqst.archiveFile);
// } catch(...) {
// }
//
// // Whether or not we were able to clean up the scheduler database, the real
// // problem here was the failure to create an entry in the NS
// throw nsEx;
// }
// requestCreation->complete();
//}
//------------------------------------------------------------------------------
// createArchiveToFileRequest
//------------------------------------------------------------------------------
cta::ArchiveToFileRequest cta::Scheduler::createArchiveToFileRequest(
const SecurityIdentity &requester,
const RemotePathAndStatus &remoteFile,
const std::string &archiveFile,
const std::string &archiveFilePath,
const uint64_t priority) const {
const std::string enclosingPath = Utils::getEnclosingPath(archiveFile);
const std::string enclosingPath = Utils::getEnclosingPath(archiveFilePath);
const std::string storageClassName = m_ns.getDirStorageClass(requester,
enclosingPath);
const StorageClass storageClass = m_db.getStorageClass(storageClassName);
assertStorageClassHasAtLeastOneCopy(storageClass);
const auto routes = m_db.getArchiveRoutes(storageClassName);
const auto copyNbToPoolMap = createCopyNbToPoolMap(routes);
std::unique_ptr<cta::ArchiveFileStatus> status = m_ns.statFile(requester, archiveFilePath);
cta::ArchiveFile archiveFile(archiveFilePath, "", status->fileId, remoteFile.status.size, 0, 0);
const CreationLog log(requester.getUser(), requester.getHost(), time(NULL));
return ArchiveToFileRequest(
......@@ -835,9 +852,9 @@ std::unique_ptr<cta::TapeMount> cta::Scheduler::getNextMount(
uint32_t existingMounts;
try {
existingMounts = existingMountsSummary.at(tpType(m->tapePool, m->type));
} catch (std::out_of_range) {
} catch (std::out_of_range &) {
existingMounts = 0;
}
}
bool mountPassesACriteria = false;
if (m->bytesQueued / (1 + existingMounts) >= m->mountCriteria.maxBytesQueued)
mountPassesACriteria = true;
......
......@@ -754,7 +754,7 @@ private:
ArchiveToFileRequest createArchiveToFileRequest(
const SecurityIdentity &requester,
const RemotePathAndStatus &remoteFile,
const std::string &archiveFile,
const std::string &archiveFilePath,
const uint64_t priority) const;
/**
......
......@@ -166,6 +166,7 @@ public:
std::string tapePool;
std::string drive;
uint64_t mountId;
std::string density;
} mountInfo;
virtual const MountInfo & getMountInfo() = 0;
virtual std::unique_ptr<ArchiveJob> getNextJob() = 0;
......
......@@ -433,7 +433,8 @@ TEST_P(SchedulerDatabaseTest, getMountInfo) {
std::map<uint16_t, std::string> destinationPoolMap;
destinationPoolMap[0] = "pool0";
destinationPoolMap[1] = "pool1";
cta::ArchiveToFileRequest atfr(remoteFile, "cta://cta/myfile", destinationPoolMap,
cta::ArchiveFile af("cta:://cta/myfile", "", 0, 1234, 0, 0);
cta::ArchiveToFileRequest atfr(remoteFile, af, destinationPoolMap,
10, cl);
std::unique_ptr<cta::SchedulerDatabase::ArchiveToFileRequestCreation> creation(db.queue(atfr));
creation->complete();
......@@ -488,7 +489,6 @@ TEST_P(SchedulerDatabaseTest, getMountInfo) {
tcl.back().fSeq = 5;
tcl.back().vid = "Tape3";
tcl.back().copyNb = 2;
cta::ArchiveFile af("cta:://cta/myfile", "", 0, 1234, 0, 0);
ASSERT_NO_THROW(db.queue(cta::RetrieveToFileRequest(af, tcl, "eos://myeos/myeosfile", 10, cl)));
mountCandidates.reset(NULL);
ASSERT_NO_THROW(mountCandidates = db.getMountInfo());
......@@ -586,7 +586,9 @@ TEST_P(SchedulerDatabaseTest, createArchiveMountAndGetJob) {
std::map<uint16_t, std::string> destinationPoolMap;
destinationPoolMap[0] = "pool0";
destinationPoolMap[1] = "pool1";
cta::ArchiveToFileRequest atfr(remoteFile, "cta://cta/myfile", destinationPoolMap,
cta::ArchiveFile af;
af.path = "cta://cta/myfile";
cta::ArchiveToFileRequest atfr(remoteFile, af, destinationPoolMap,
10, cl);
std::unique_ptr<cta::SchedulerDatabase::ArchiveToFileRequestCreation> creation(db.queue(atfr));
creation->complete();
......
......@@ -848,17 +848,24 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
ASSERT_NO_THROW(scheduler.setDirStorageClass(requester, "/", "SINGLE"));
// create the logical library
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "illogical", "the illogical library"));
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "T10KD6", "the illogical library"));
// create the tape pool
ASSERT_NO_THROW(scheduler.createTapePool(requester, "swimmingpool", 2, "the swimming pool"));
cta::MountCriteria immediateMount;
immediateMount.maxAge = 0;
immediateMount.maxBytesQueued = 1;
immediateMount.maxFilesQueued = 1;
immediateMount.quota = 10;
ASSERT_NO_THROW(scheduler.setTapePoolMountCriteria("swimmingpool", cta::MountCriteriaByDirection(immediateMount, immediateMount)));
// create the route
ASSERT_NO_THROW(scheduler.createArchiveRoute(requester, "SINGLE", 1, "swimmingpool", "iArchive"));
// create the tape
std::string comment = "the magic tape";
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "illogical", "swimmingpool", 100000, "8000GC", comment));
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "T10KD6", "swimmingpool", 100000, "8000GC", comment));
// List to remember the path of each remote file so that the existence of the
// files can be tested for at the end of the test
......@@ -877,8 +884,9 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
// schedule the archivals
for(int fseq=1; fseq <= 10 ; fseq ++) {
// Create a path to a remote destination file
// Create a path to a remote source file
std::ostringstream remoteFilePath;
// remoteFilePath << "file:" << "/test" << fseq;
remoteFilePath << "file:" << "/test" << fseq;
remoteFilePaths.push_back(remoteFilePath.str());
......@@ -907,7 +915,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
castor::server::ProcessCap capUtils;
castor::messages::TapeserverProxyDummy initialProcess;
DataTransferSession sess("tapeHost", logger, mockSys, driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
ASSERT_NO_THROW(sess.execute());
/*ASSERT_NO_THROW*/(sess.execute());
std::string temp = logger.getLog();
temp += "";
ASSERT_EQ("V12345", sess.getVid());
......@@ -964,7 +972,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
ASSERT_NO_THROW(scheduler.setDirStorageClass(requester, "/", "SINGLE"));
// create the logical library
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "illogical", "the illogical library"));
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "T10KD6", "the illogical library"));
// create the tape pool
ASSERT_NO_THROW(scheduler.createTapePool(requester, "swimmingpool", 2, "the swimming pool"));
......@@ -974,7 +982,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
// create the tape
std::string comment = "the magic tape";
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "illogical", "swimmingpool", 100000, "8000GC", comment));
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "T10KD6", "swimmingpool", 100000, "8000GC", comment));
// List to remember the path of each remote file so that the existence of the
// files can be tested for at the end of the test
......@@ -1068,7 +1076,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
ASSERT_NO_THROW(scheduler.setDirStorageClass(requester, "/", "SINGLE"));
// create the logical library
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "illogical", "the illogical library"));
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "T10KD6", "the illogical library"));
// create the tape pool
ASSERT_NO_THROW(scheduler.createTapePool(requester, "swimmingpool", 2, "the swimming pool"));
......@@ -1078,7 +1086,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
// create the tape
std::string comment = "the magic tape";
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "illogical", "swimmingpool", 100000, "8000GC", comment));
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "T10KD6", "swimmingpool", 100000, "8000GC", comment));
// List to remember the path of each remote file so that the existence of the
// files can be tested for at the end of the test
......@@ -1183,7 +1191,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
ASSERT_NO_THROW(scheduler.setDirStorageClass(requester, "/", "SINGLE"));
// create the logical library
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "illogical", "the illogical library"));
ASSERT_NO_THROW(scheduler.createLogicalLibrary(requester, "T10KD6", "the illogical library"));
// create the tape pool
ASSERT_NO_THROW(scheduler.createTapePool(requester, "swimmingpool", 2, "the swimming pool"));
......@@ -1193,7 +1201,7 @@ TEST_F(castor_tape_tapeserver_daemon_DataTransferSessionTest, DataTransferSessio
// create the tape
std::string comment = "the magic tape";
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "illogical", "swimmingpool", 100000, "8000GC", comment));
ASSERT_NO_THROW(scheduler.createTape(requester, "V12345", "T10KD6", "swimmingpool", 100000, "8000GC", comment));
// List to remember the path of each remote file so that the existence of the
// files can be tested for at the end of the test
......