I'm trying to unit test EventStore persistence using JSON serialization and Sqlite running in inmemory-mode. I'm getting a "No such table: Commits" exception during EventStore initialization. I'm assuming this is because EventStore somehow closes the connection and opens a new one, causing it to see a new in-memory Sqlite instance (sans Commits table). Is there any way to make this work?
1
There are 1 best solutions below
Related Questions in CQRS
- Correlating aggregates by Saga ID instead of an additional aggregate root
- Command Bus/Dispatcher and Handler registration without Dependency Injection
- WPF Line Of Business Application Architecture
- Command Query Responsibility Segregation (CQRS) / Event Sourcing (ES): Why use it? How to address consistency issues?
- Defining aggregate roots when invariants exist within a list
- Domain Model with Event Sourcing
- DDD\CQRS\Event Sourcing and request historical data
- CQRS + ES - Where to query Data needed for business logic?
- CQRS, multiple write nodes for a single aggregate entry, while maintaining concurrency
- Event sourcing microservices: How to manage timestamp
- In context of CQRS and DDD how would you handle slightly varying use cases?
- EasyNetQ / RabbitMQ consuming events in Web API
- Validation and synchronous commands in CQRS
- Read model for aggregate in DDD CQRS ES
- How to generate identities when source of truth is Apache Kafka?
Related Questions in NEVENTSTORE
- EventSourcing in occassionally connected systems: what if there are two servers?
- NEventStore RavenDB - Obtain Commit Data
- How does NEventStore throws assert commits are uniquely identified?
- What difference between NEventStore and EventStoreDB
- CQRS/EventStore : How to dispatch undispatched events?
- CommonDomain/EventStore/CQRS : Where is the test project for commondomain?
- EventStore and more than one unit of work?
- EventStore build.cmd Errors
- How to get SqlPersistence instance configured with connection string in Jonathan Oliver's EventStore?
- EventStore example applications with source?
- CQRS/EventStore : How to check if an aggregate exists?
- Is there a Java port or equivalent of the NEventStore library?
- Should IEventStore Instance be Static?
- J Oliver EventStore - Examples exception
- NEventStore and Sqlite in-memory
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The SQLite implementation is interesting, especially when you're using the ":memory:" connection string. The acceptance tests surrounding the implementation depend upon the the database not "disappearing" between operations.
The fundamental design of the EventStore separates each discrete action into a separate operation which:
The issue that you're running into is that each invocation against the EventStore opens and closes the connection.
Now, there is a way around this because I wanted to support explicitly utilizing the same IDbConnection without releasing it back to the pool. EventStore v3.0 (which is in release candidate stage) has a method call that utilizes the same connection and which avoids connection tear down after each operation:
Simply add this to the "using_the_persistence_engine" acceptance tests class and you're all set:
Add this as the first line to "Establish context":
Finally, the lastline in "Cleanup everything" should be: