diff --git a/tests/communication/test-sync-logic-handler.cpp b/tests/communication/test-sync-logic-handler.cpp
index c4a630b..9a0c7e3 100644
--- a/tests/communication/test-sync-logic-handler.cpp
+++ b/tests/communication/test-sync-logic-handler.cpp
@@ -39,7 +39,7 @@
   getSync()
   {
     if (m_sync == nullptr) {
-      m_sync.reset(new SyncLogicHandler(face, m_keyChain, testIsLsaNew, opts));
+      m_sync = std::make_unique<SyncLogicHandler>(face, m_keyChain, testIsLsaNew, opts);
     }
     return *m_sync;
   }
@@ -50,9 +50,11 @@
     this->advanceClocks(1_ms, 10);
     face.sentInterests.clear();
 
+#ifdef HAVE_PSYNC
     std::vector<psync::MissingDataInfo> updates;
     updates.push_back({prefix, 0, seqNo, 0});
     getSync().m_syncLogic.onPSyncUpdate(updates);
+#endif
 
     this->advanceClocks(1_ms, 10);
   }
diff --git a/tests/security/test-certificate-store.cpp b/tests/security/test-certificate-store.cpp
index 03e086a..484959e 100644
--- a/tests/security/test-certificate-store.cpp
+++ b/tests/security/test-certificate-store.cpp
@@ -85,7 +85,6 @@
     advanceClocks(20_ms);
   }
 
-public:
   void
   checkForInterest(ndn::Name& interstName)
   {
@@ -99,8 +98,8 @@
     BOOST_CHECK(didFindInterest);
   }
 
+protected:
   ndn::DummyClientFace face;
-
   ConfParameter conf;
   DummyConfFileProcessor confProcessor;
 
@@ -223,29 +222,23 @@
   data.setContent(nameLsa.wireEncode());
   data.setFinalBlock(lsaDataName[-1]);
 
-  // Sign data with this NLSR's key (in real it would be different NLSR)
-  m_keyChain.sign(data, conf.m_signingInfo);
-  face.put(data);
+  // Test with unsigned data first (lacks KeyLocator).
+  // This should not happen during normal operations, but CertificateStore
+  // should still be able to handle invalid packets without crashing
+  lsdb.emitSegmentValidatedSignal(data);
 
-  this->advanceClocks(1_ms);
+  // Sign data with this NLSR's key (in reality it would be a different NLSR)
+  m_keyChain.sign(data, conf.m_signingInfo);
 
   // Make NLSR validate data signed by its own key
   conf.getValidator().validate(data,
-                                 [] (const ndn::Data&) { BOOST_CHECK(true); },
-                                 [] (const ndn::Data&, const ndn::security::ValidationError& e) {
-                                   BOOST_ERROR(e);
-                                 });
+                               [] (const auto&) { BOOST_CHECK(true); },
+                               [] (const auto&, const auto& err) { BOOST_ERROR(err); });
 
   lsdb.emitSegmentValidatedSignal(data);
   auto certName = data.getSignatureInfo().getKeyLocator().getName();
   auto keyName = ndn::security::extractKeyNameFromCertName(certName);
   BOOST_CHECK(certStore.find(keyName) != nullptr);
-
-  // testing a callback after segment validation signal from lsdb
-  ndn::signal::ScopedConnection connection = lsdb.afterSegmentValidatedSignal.connect(
-  [&] (const ndn::Data& lsaSegment) {
-    BOOST_CHECK_EQUAL(lsaSegment.getName(), data.getName());
-  });
 }
 
 BOOST_AUTO_TEST_SUITE_END()
