Skip to content

Commit

Permalink
Merge c6348c6 into 02a2fe9
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Mckenzie committed Jan 8, 2019
2 parents 02a2fe9 + c6348c6 commit 00b9f16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on [Keep a CHANGELOG](http://keepachangelog.com/). This project adheres to

## [Unreleased]

## [1.1.0-M8] - 2019-01-08
### Fixed
- Fixed error of two subscriptions created in database for each subscription

## [1.1.0-M7] - 2019-01-03
### Changed
- Fix checksum issue with liquibase scripts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void performEventCatchup(final Subscription subscription) {

logger.info("Event catchup started");
logger.info("Performing catchup of events...");
final long eventNumber = subscriptionsRepository.getOrInitialiseCurrentEventNumber(subscription.getName());
final long eventNumber = subscriptionsRepository.getOrInitialiseCurrentEventNumber(subscription.getEventSourceName());

final int totalEventsProcessed = eventSource.findEventsSince(eventNumber)
.mapToInt(transactionalEventProcessor::processWithEventBuffer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class EventCatchupProcessorTest {
@Test
public void shouldFetchAllMissingEventsAndProcess() throws Exception {

final String subscriptionName = "subscriptionName";
final String eventSourceName = "event source";
final long eventNumber = 983745987L;

Expand All @@ -56,8 +55,7 @@ public void shouldFetchAllMissingEventsAndProcess() throws Exception {

when(subscription.getEventSourceName()).thenReturn(eventSourceName);
when(eventSourceProvider.getEventSource(eventSourceName)).thenReturn(eventSource);
when(subscription.getName()).thenReturn(subscriptionName);
when(subscriptionsRepository.getOrInitialiseCurrentEventNumber(subscriptionName)).thenReturn(eventNumber);
when(subscriptionsRepository.getOrInitialiseCurrentEventNumber(eventSourceName)).thenReturn(eventNumber);
when(eventSource.findEventsSince(eventNumber)).thenReturn(Stream.of(event_1, event_2, event_3));
when(transactionalEventProcessor.processWithEventBuffer(any(JsonEnvelope.class))).thenReturn(1);

Expand Down

0 comments on commit 00b9f16

Please sign in to comment.