GreanTech / AtomEventStore

A server-less .NET Event Store based on the Atom syndication format
MIT License
117 stars 14 forks source link

Silently fail update of last link #105

Closed ploeh closed 9 years ago

ploeh commented 9 years ago

The purpose of this pull request is to address #96.

sgryt commented 9 years ago

It looks correct. Two things spring to mind, though (now that we are not in happy-path testing territory).

I'm not entirely sure how one would go about adding tests for these cases, as, if the implementation is indeed correct, such tests would not fail, but maybe a few, well-chosen temporary implementation 'disablings', could do the trick.

ploeh commented 9 years ago

PR updated with more test cases.

In summary, upon repeated failure of update of the index document, the events are still written, but the access time becomes more and more inefficient.

Agreed that the implementation code is a mess, but I didn't want to refactor it before I knew that it had the correct behaviour.

sgryt commented 9 years ago

No further comments - I believe it works as intended now. At least, I have failed to detect any logical flaws or implementation problems.

ploeh commented 9 years ago

OK, will you pull, then?

sgryt commented 9 years ago

Certainly - done now.

ploeh commented 9 years ago

Thank you :+1: