Beispiel #1
0
void sessionmanager_2()
{
	DBRM dbrm;
	SessionManagerServer::TxnID tmp;
	int ver1, ver2;

	ver1 = dbrm.verID();
	tmp = dbrm.newTxnID(1000, true);
	ver2 = dbrm.verID();
	
	CPPUNIT_ASSERT(ver2 == ver1 + 1);
	CPPUNIT_ASSERT(ver2 == tmp.id);
	CPPUNIT_ASSERT(tmp.valid == true);

	dbrm.committed(tmp);
	CPPUNIT_ASSERT(tmp.valid == false);
}
Beispiel #2
0
void sessionmanager_1()
{
	DBRM dbrm;
	int tmp = -1;

	tmp = dbrm.verID();
	// there's no "correct" value b/c it's monotonically increasing.
}