Exemple #1
0
        public void Writer_replies_inconsistency_message_on_duplicated_request()
        {
            var store  = MockProjectionStore.ThrowsOnWrite(new DuplicatedEntryException());
            var writer = CreateWriter(store);

            writer.Tell(new ProjectionIndexPersistenceRequest("a", 1, 1));
            ExpectMsg <ProjectionIndexInconsistencyDetected>();
        }
Exemple #2
0
        public void Writer_does_not_reply_on_unexpected_exceptions()
        {
            // in case of unexpected exceptions, like connection issues
            // the way to handle is to let the projection detect inconsistencies when the write works
            // and rebuild the index if needed, so we don't expect any error messages

            var store  = MockProjectionStore.ThrowsOnWrite(new Exception());
            var writer = CreateWriter(store);

            writer.Tell(new ProjectionIndexPersistenceRequest("a", 1, 1));
            ExpectNoMsg(TimeSpan.FromSeconds(1));
        }