[CONTROLLER-513] Add mock data store for unit tests Created: 27/May/14  Updated: 19/Oct/17  Resolved: 28/Aug/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

Type: Improvement
Reporter: Rob Adams Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Blocks
blocks MDSAL-13 Milestone: Data Store Tracer Confirmed

 Description   

A mock data store that can be easily instantiated from unit tests would be very helpful. So for data store mocks, it would be nice to be able to do something like:

dataStoreProvider = new MockDataStoreProvider();
dataStoreProvider.writeConfigurationJson(iid, JSON_CONSTANT);



 Comments   
Comment by Rob Adams [ 27/May/14 ]

Related mailing list thread: https://lists.opendaylight.org/pipermail/controller-dev/2014-May/004500.html

Comment by Tony Tkacik [ 15/Jul/14 ]

Add test utility which provides access to mock datastore.
Current (existing candidates for Mock DataStore are exported as

<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-broker-impl</artifactId>
<version>1.1-SNAPSHOT</version>
<classifier>tests</classifier>
</dependency>

And following classes provides you with InMemory Data Store / Broker
with full feature support:
AbstractDataBrokerTest
DataBrokerTestCustomizer
BidningTestContext

Comment by Tony Tkacik [ 28/Aug/14 ]

Datastore is available as mentioned in previous comment.

Generated at Wed Feb 07 19:53:12 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.