Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bug 5153: Add timestamp to TransactionIdentifier
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
identifiers
/
TransactionChainIdentifierTest.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/identifiers/TransactionChainIdentifierTest.java
b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/identifiers/TransactionChainIdentifierTest.java
index 265ecb56b3d4104c373b7aec1c120d54338c3f17..1e965bf46d3a18a4a3c861e4739645408ffeaeaa 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/identifiers/TransactionChainIdentifierTest.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/identifiers/TransactionChainIdentifierTest.java
@@
-8,7
+8,9
@@
package org.opendaylight.controller.cluster.datastore.identifiers;
package org.opendaylight.controller.cluster.datastore.identifiers;
+import static org.hamcrest.CoreMatchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
import org.junit.Test;
public class TransactionChainIdentifierTest {
import org.junit.Test;
public class TransactionChainIdentifierTest {
@@
-27,11
+29,11
@@
public class TransactionChainIdentifierTest {
TransactionIdentifier txId1 = transactionChainIdentifier.newTransactionIdentifier();
TransactionIdentifier txId1 = transactionChainIdentifier.newTransactionIdentifier();
- assert
Equals("member-1-chn-99-txn-1", txId1.toString(
));
+ assert
That(txId1.toString(), startsWith("member-1-chn-99-txn-1-"
));
TransactionIdentifier txId2 = transactionChainIdentifier.newTransactionIdentifier();
TransactionIdentifier txId2 = transactionChainIdentifier.newTransactionIdentifier();
- assert
Equals("member-1-chn-99-txn-2", txId2.toString(
));
+ assert
That(txId2.toString(), startsWith("member-1-chn-99-txn-2-"
));
}
}
\ No newline at end of file
}
}
\ No newline at end of file