public void can_cancel_reservations() { Assert.False(_sut.GetOrReserve("streamA", out var numberA, out _, out _)); Assert.Equal(1024U, numberA); _sut.CancelReservations(); Assert.False(_sut.GetOrReserve("streamC", out var numberC, out _, out _)); Assert.Equal(numberA, numberC); }
void GenSut() { _sut?.CancelReservations(); _persistence?.Dispose(); _persistence = new FASTERNameIndexPersistence( indexName: "StreamNameIndexPersistence", logDir: _outputDir, firstValue: LogV3SystemStreams.FirstRealStream, valueInterval: LogV3SystemStreams.StreamInterval, initialReaderCount: 1, maxReaderCount: 1, enableReadCache: true, checkpointInterval: Timeout.InfiniteTimeSpan); _sut = new( indexName : "StreamNameIndex", firstValue : LogV3SystemStreams.FirstRealStream, valueInterval : LogV3SystemStreams.StreamInterval, existenceFilter : new NoNameExistenceFilter(), persistence : _persistence, metastreams : new LogV3Metastreams()); }
void GenSut() { _sut?.CancelReservations(); _persistence?.Dispose(); _persistence = new FASTERNameIndexPersistence( indexName: "EventTypeIndexPersistence", logDir: _outputDir, firstValue: LogV3SystemEventTypes.FirstRealEventTypeNumber, valueInterval: LogV3SystemEventTypes.EventTypeInterval, initialReaderCount: 1, maxReaderCount: 1, enableReadCache: true, checkpointInterval: Timeout.InfiniteTimeSpan); _sut = new( indexName: "EventTypeIndex", firstValue: LogV3SystemEventTypes.FirstRealEventTypeNumber, valueInterval: LogV3SystemEventTypes.EventTypeInterval, existenceFilter: new NoNameExistenceFilter(), persistence: _persistence, metastreams: null, recordTypeToHandle: typeof(LogV3EventTypeRecord)); }