diff options
author | jmisinco | 2012-05-18 20:31:00 +0000 |
---|---|---|
committer | Roberto E. Escobar | 2012-05-18 20:31:00 +0000 |
commit | 04c3aa09abe83729a38af78dde6bed4530b66bb1 (patch) | |
tree | d74b7e6293b522d24d53b09c7fe480d40986d583 /plugins/org.eclipse.osee.framework.core.model.test | |
parent | effa0d7ffe1342e2a627346dd6d0ae563f88db05 (diff) | |
download | org.eclipse.osee-04c3aa09abe83729a38af78dde6bed4530b66bb1.tar.gz org.eclipse.osee-04c3aa09abe83729a38af78dde6bed4530b66bb1.tar.xz org.eclipse.osee-04c3aa09abe83729a38af78dde6bed4530b66bb1.zip |
bug[ats_9YVXA]: Fix intermittent null BranchCache in TransactionRecord
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.model.test')
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java index 3c61ec94e46..29ec2d69211 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java @@ -102,7 +102,10 @@ public final class MockDataFactory { if (value == 0) { value++; } - return new TransactionRecord(value * 47, branchId, "comment_" + value, new Date(), value * 37, value * 42, type); + MockOseeDataAccessor<String, Branch> accessor = new MockOseeDataAccessor<String, Branch>(); + BranchCache cache = new BranchCache(accessor); + return new TransactionRecord(value * 47, branchId, "comment_" + value, new Date(), value * 37, value * 42, type, + cache); } public static OseeEnumEntry createEnumEntry(int index) { diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java index 17edb55bf35..7274af8afca 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java @@ -44,8 +44,6 @@ public class TransactionRecordTest { private final int commitArtId; public TransactionRecordTest(int transactionNumber, int branchId, String comment, Date time, int authorArtId, int commitArtId, TransactionDetailsType txType) { - this.transaction = - new TransactionRecord(transactionNumber, branchId, comment, time, authorArtId, commitArtId, txType); this.transactionNumber = transactionNumber; this.branchId = branchId; this.comment = comment; @@ -53,6 +51,9 @@ public class TransactionRecordTest { this.authorArtId = authorArtId; this.commitArtId = commitArtId; this.txType = txType; + + this.transaction = + new TransactionRecord(transactionNumber, branchId, comment, time, authorArtId, commitArtId, txType, null); } @Test |