tests: don't store shared_ptr<pit::Entry> in StrategyTester
refs #3205
Change-Id: I20ed5023fe07ba71d8df56a02228013acb8a8cb6
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 3a2384f..3c4ef9b 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -56,8 +56,7 @@
Face& outFace,
bool wantNewNonce = false) override
{
- SendInterestArgs args{pitEntry, outFace.getId(), wantNewNonce};
- sendInterestHistory.push_back(args);
+ sendInterestHistory.push_back({pitEntry->getInterest(), outFace.getId(), wantNewNonce});
pitEntry->insertOrUpdateOutRecord(outFace, pitEntry->getInterest());
afterAction();
}
@@ -65,8 +64,7 @@
virtual void
rejectPendingInterest(const shared_ptr<pit::Entry>& pitEntry) override
{
- RejectPendingInterestArgs args{pitEntry};
- rejectPendingInterestHistory.push_back(args);
+ rejectPendingInterestHistory.push_back({pitEntry->getInterest()});
afterAction();
}
@@ -74,8 +72,7 @@
sendNack(const shared_ptr<pit::Entry>& pitEntry, const Face& outFace,
const lp::NackHeader& header) override
{
- SendNackArgs args{pitEntry, outFace.getId(), header};
- sendNackHistory.push_back(args);
+ sendNackHistory.push_back({pitEntry->getInterest(), outFace.getId(), header});
pitEntry->deleteInRecord(outFace);
afterAction();
}
@@ -83,7 +80,7 @@
public:
struct SendInterestArgs
{
- shared_ptr<pit::Entry> pitEntry;
+ Interest pitInterest;
FaceId outFaceId;
bool wantNewNonce;
};
@@ -91,13 +88,13 @@
struct RejectPendingInterestArgs
{
- shared_ptr<pit::Entry> pitEntry;
+ Interest pitInterest;
};
std::vector<RejectPendingInterestArgs> rejectPendingInterestHistory;
struct SendNackArgs
{
- shared_ptr<pit::Entry> pitEntry;
+ Interest pitInterest;
FaceId outFaceId;
lp::NackHeader header;
};