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 answers
Related Questions in CQRS
- Domain driven design CQRS with multiple aggregates and bounded context
- Where do I put business logic when implementing CQRS pattern using Mediatr in a .Net Clean Architecture application?
- Separating command from query in the spring boot CQRS projects(Multi module)
- Prevent duplicate records in ASP.NET Core app with CQRS architecture
- Service IValidator Array
- Transactionnal events with NestJS & CQRS
- What should be stored in materialized view when implementing event driven CQRS?
- Operations without writing to the DB In DDD
- What is the alternate solution for AddMediatR in the .NET Core Web API Program.CS file?
- Akka: currentEventsByPersistenceId always returns zero for 'eventEnvelope.timestamp'
- Does a command persist state itself, when we combine CQRS with Event Sourcing, or is it delegating to the EventBus?
- How to handle one to many relationship in CQRS/ES/Saga architecture?
- Communication between the writing model and the reading model in CQRS + DDD
- Issue with CQRS Implementation in NestJS with Mongoose
- How to specify which handler to route Mediator query/command?
Related Questions in NEVENTSTORE
- Is there any way to compress the data while using mongo persistence with NEventStore?
- Correct way of implementing optimistic concurrency with NEventStore
- Global sequential number generator without using a relational database
- NEventStore with multiple producers
- EventSourcing in occassionally connected systems: what if there are two servers?
- Why do I keep getting a ConflictingCommandException when trying to save my domain object to NEventStore?
- Event Store subscription service to MongoDB
- Event Source, Anti-Corruption layer design with NEventStore
- NES- Command doesn't send to CommandHandler
- How to create a LocalDB instance for NEventStore
- NEventStore get projection which lists all aggregates of a given type
- Serializing complex types using the built in JSON Serializer of NEventStore
- NEventStore - decrypt and deserialize stared event data
- How to change the type of _id in NEventStore.Persistence.MongoDB?
- NEventStore: Sagas, Commands and not Losing Them
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?
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)
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: