sync core works except for simultaneous changes;
that will cause CcnxOperationException in CcnxWrapper;
this is suspicious, not related to sync core's logic
diff --git a/test/database-test.cc b/test/database-test.cc
index c9058e9..016d784 100644
--- a/test/database-test.cc
+++ b/test/database-test.cc
@@ -62,6 +62,10 @@
hash = db.RememberStateInStateLog ();
BOOST_CHECK_EQUAL (lexical_cast<string> (*hash), "86b51f1f98662583b295b61385ae4450ff8fac955981f1ca4381144ab1d7a4e0");
+ db.UpdateLocator(Name ("Alex"), Name("Hawaii"));
+
+ BOOST_CHECK_EQUAL(db.LookupLocator(Name ("Alex")), Name ("Hawaii"));
+
// db.FindStateDifferences ("00", "95284d3132a7a88b85c5141ca63efa68b7a7daf37315def69e296a0c24692833");
// db.FindStateDifferences ("86b51f1f98662583b295b61385ae4450ff8fac955981f1ca4381144ab1d7a4e0", "00");
diff --git a/test/test-sync-core.cc b/test/test-sync-core.cc
index d65cafe..5db4eda 100644
--- a/test/test-sync-core.cc
+++ b/test/test-sync-core.cc
@@ -27,7 +27,7 @@
string strName = state.name();
result.deviceName = Name((const unsigned char *)strName.c_str(), strName.size());
string strLoc = state.locator();
- result.locator = Name((const unsigned char *)strLoc.c_str(), strName.size());
+ result.locator = Name((const unsigned char *)strLoc.c_str(), strLoc.size());
result.seq = state.seq();
}
else
@@ -78,6 +78,8 @@
HashPtr root1 = core1->root();
HashPtr root2 = core2->root();
BOOST_CHECK_EQUAL(*root1, *root2);
+
+ cout << "\n\n\n\n\n\n----------\n";
core1->updateLocalState(1);
usleep(100000);
BOOST_CHECK_EQUAL(result2.seq, 1);