summaryrefslogtreecommitdiff
path: root/cpp/src/tests/StoreStatus.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-11-24 22:41:10 +0000
committerAlan Conway <aconway@apache.org>2009-11-24 22:41:10 +0000
commit8477c62f2a4f7d989f0e1ea1ac3f2a2505d9a9dd (patch)
treedb2ad51f6cdf82d42a0c4025aa01caa5cf0802b7 /cpp/src/tests/StoreStatus.cpp
parent51d4bf1a1a07e53164c6e771f6ecf10e3ffca4ec (diff)
downloadqpid-python-8477c62f2a4f7d989f0e1ea1ac3f2a2505d9a9dd.tar.gz
Verify stored cluster-id matches agreed cluster-id when joining a persistent cluster.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@883910 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/StoreStatus.cpp')
-rw-r--r--cpp/src/tests/StoreStatus.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/cpp/src/tests/StoreStatus.cpp b/cpp/src/tests/StoreStatus.cpp
index 37ba19e34a..153e4a33db 100644
--- a/cpp/src/tests/StoreStatus.cpp
+++ b/cpp/src/tests/StoreStatus.cpp
@@ -43,64 +43,64 @@ QPID_AUTO_TEST_CASE(testLoadEmpty) {
create_directory(TEST_DIR);
StoreStatus ss(TEST_DIR);
BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_NO_STORE);
- BOOST_CHECK(!ss.getStart());
- BOOST_CHECK(!ss.getStop());
+ BOOST_CHECK(!ss.getClusterId());
+ BOOST_CHECK(!ss.getShutdownId());
ss.load();
BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_EMPTY_STORE);
- BOOST_CHECK(!ss.getStop());
+ BOOST_CHECK(!ss.getShutdownId());
remove_all(TEST_DIR);
}
QPID_AUTO_TEST_CASE(testSaveLoadDirty) {
create_directory(TEST_DIR);
- Uuid start = Uuid(true);
+ Uuid clusterId = Uuid(true);
StoreStatus ss(TEST_DIR);
ss.load();
- ss.dirty(start);
+ ss.dirty(clusterId);
BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_DIRTY_STORE);
StoreStatus ss2(TEST_DIR);
ss2.load();
BOOST_CHECK_EQUAL(ss2.getState(), STORE_STATE_DIRTY_STORE);
- BOOST_CHECK_EQUAL(ss2.getStart(), start);
- BOOST_CHECK(!ss2.getStop());
+ BOOST_CHECK_EQUAL(ss2.getClusterId(), clusterId);
+ BOOST_CHECK(!ss2.getShutdownId());
remove_all(TEST_DIR);
}
QPID_AUTO_TEST_CASE(testSaveLoadClean) {
create_directory(TEST_DIR);
- Uuid start = Uuid(true);
- Uuid stop = Uuid(true);
+ Uuid clusterId = Uuid(true);
+ Uuid shutdownId = Uuid(true);
StoreStatus ss(TEST_DIR);
ss.load();
- ss.dirty(start);
- ss.clean(stop);
+ ss.dirty(clusterId);
+ ss.clean(shutdownId);
BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_CLEAN_STORE);
StoreStatus ss2(TEST_DIR);
ss2.load();
BOOST_CHECK_EQUAL(ss2.getState(), STORE_STATE_CLEAN_STORE);
- BOOST_CHECK_EQUAL(ss2.getStart(), start);
- BOOST_CHECK_EQUAL(ss2.getStop(), stop);
+ BOOST_CHECK_EQUAL(ss2.getClusterId(), clusterId);
+ BOOST_CHECK_EQUAL(ss2.getShutdownId(), shutdownId);
remove_all(TEST_DIR);
}
QPID_AUTO_TEST_CASE(testMarkDirty) {
// Save clean then mark to dirty.
create_directory(TEST_DIR);
- Uuid start = Uuid(true);
- Uuid stop = Uuid(true);
+ Uuid clusterId = Uuid(true);
+ Uuid shutdownId = Uuid(true);
StoreStatus ss(TEST_DIR);
ss.load();
- ss.dirty(start);
- ss.clean(stop);
- ss.dirty(start);
+ ss.dirty(clusterId);
+ ss.clean(shutdownId);
+ ss.dirty(clusterId);
StoreStatus ss2(TEST_DIR);
ss2.load();
BOOST_CHECK_EQUAL(ss2.getState(), STORE_STATE_DIRTY_STORE);
- BOOST_CHECK_EQUAL(ss2.getStart(), start);
- BOOST_CHECK(!ss2.getStop());
+ BOOST_CHECK_EQUAL(ss2.getClusterId(), clusterId);
+ BOOST_CHECK(!ss2.getShutdownId());
remove_all(TEST_DIR);
}