GreanTech / AtomEventStore

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

Erratic Test in FifoEventsTests #69

Closed ploeh closed 10 years ago

ploeh commented 10 years ago

I just got this unit test error when running all tests in Visual Studio:

Test 'Grean.AtomEventStore.UnitTests.FifoEventsTests.SutYieldsPagedEvents(dummyResolver: Grean.AtomEventStore.UnitTests.TestEventTypeResolver, dummySerializer: Grean.AtomEventStore.XmlContentSerializer, dummyInjectedIntoSut: Grean.AtomEventStore.AtomEventsInMemory, dummyId: urn:uuid:dad86e31-7e00-48e5-9feb-1f0d9c29c247, writer: Grean.AtomEventStore.AtomEventObserver1[Grean.AtomEventStore.UnitTests.XmlAttributedTestEventX], sut: Grean.AtomEventStore.FifoEvents1[Grean.AtomEventStore.UnitTests.XmlAttributedTestEventX], eventGenerator: Ploeh.AutoFixture.Generator1[Grean.AtomEventStore.UnitTests.XmlAttributedTestEventX])' failed: System.InvalidOperationException : Sequence contains no elements at System.Linq.Enumerable.Single[TSource](IEnumerable1 source) AtomLink.cs(105,0): at Grean.AtomEventStore.AtomLink.ReadFrom(XmlReader xmlReader) AtomFeed.cs(207,0): at Grean.AtomEventStore.AtomFeed.b1(XPathNavigator x) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source, Func2 predicate) FifoEvents.cs(62,0): at Grean.AtomEventStore.FifoEvents1.ReadNext(AtomFeed page) FifoEvents.cs(36,0): at Grean.AtomEventStore.FifoEvents`1.<>cDisplayClass2.b__0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()

Re-running the tests produced an all green result, so this indicates an Erratic Test (or, a subtle bug somewhere in AtomEventStore).

ploeh commented 10 years ago

Since I haven't seen this test failure since I reported it, I'm now going to close it. It can be reopened if it appears again.