Hello,
We are upgrade from V2.0.1 of GES to V3.0.3.
In order to test, I tried to run following test case against event store repository.
Testcase targetting V2.0.1 version
[TestMethod]
[ExpectedException(typeof(AggregateDeletedException))]
public void ThrowOnGetDeletedAggregate()
{
var savedId = SaveTestAggregateWithoutCustomHeaders(repo, 10);
var streamName = string.Format(“testAggregate-{0}”, savedId.ToString(“N”));
connection.DeleteStream(streamName, 10);
repo.GetById(savedId);
}
``
Testcase targetting V3.0.3 version
[TestMethod]
[ExpectedException(typeof(AggregateDeletedException))]
public void ThrowOnGetDeletedAggregate()
{
var savedId = SaveTestAggregateWithoutCustomHeaders(repo, 10);
var streamName = string.Format(“testAggregate-{0}”, savedId.ToString(“N”));
connection.DeleteStreamAsync(streamName, 10).Wait();
repo.GetById(savedId);
}
``
The code snippet in the repository that throws the exception:
currentSlice = eventStoreConnection.ReadStreamEventsForwardAsync(streamName, sliceStart, sliceCount, false).Result;
if (currentSlice.Status == SliceReadStatus.StreamNotFound)
throw new AggregateNotFoundException(id, typeof(TAggregate));
if (currentSlice.Status == SliceReadStatus.StreamDeleted)
throw new AggregateDeletedException(id, typeof(TAggregate));
``
The test case targeted for V2.0.1 passes while test case targeted for V3.0.3 fails with AggregateNoteFoundException.
Has the behaviour of deleting stream changed in V3.0.3?