use of de.codecentric.boot.admin.server.eventstore.InMemoryEventStore in project spring-boot-admin by codecentric.
the class InstanceRegistryTest method setUp.
@BeforeEach
public void setUp() {
repository = new EventsourcingInstanceRepository(new InMemoryEventStore());
idGenerator = new HashingInstanceUrlIdGenerator();
registry = new InstanceRegistry(repository, idGenerator);
}
use of de.codecentric.boot.admin.server.eventstore.InMemoryEventStore in project spring-boot-admin by codecentric.
the class InstanceDiscoveryListenerTest method setup.
@BeforeEach
public void setup() {
this.discovery = mock(DiscoveryClient.class);
InstanceRepository repository = new EventsourcingInstanceRepository(new InMemoryEventStore());
this.registry = spy(new InstanceRegistry(repository, new HashingInstanceUrlIdGenerator()));
this.listener = new InstanceDiscoveryListener(this.discovery, this.registry, repository);
}
use of de.codecentric.boot.admin.server.eventstore.InMemoryEventStore in project spring-boot-admin by codecentric.
the class EndpointDetectorTest method setup.
@BeforeEach
public void setup() {
eventStore = new InMemoryEventStore();
repository = new EventsourcingInstanceRepository(eventStore);
strategy = mock(EndpointDetectionStrategy.class);
detector = new EndpointDetector(repository, strategy);
}
use of de.codecentric.boot.admin.server.eventstore.InMemoryEventStore in project spring-boot-admin by codecentric.
the class InfoUpdaterTest method setup.
@BeforeEach
public void setup() {
this.eventStore = new InMemoryEventStore();
this.repository = new EventsourcingInstanceRepository(this.eventStore);
this.updater = new InfoUpdater(this.repository, InstanceWebClient.builder().filter(rewriteEndpointUrl()).filter(retry(0, singletonMap(Endpoint.INFO, 1))).filter(timeout(Duration.ofSeconds(2), emptyMap())).build());
this.wireMock.start();
}
use of de.codecentric.boot.admin.server.eventstore.InMemoryEventStore in project spring-boot-admin by codecentric.
the class StatusUpdaterTest method setup.
@BeforeEach
public void setup() {
this.wireMock.start();
this.eventStore = new InMemoryEventStore();
this.repository = new EventsourcingInstanceRepository(this.eventStore);
this.instance = Instance.create(InstanceId.of("id")).register(Registration.create("foo", this.wireMock.url("/health")).build());
StepVerifier.create(this.repository.save(this.instance)).expectNextCount(1).verifyComplete();
this.updater = new StatusUpdater(this.repository, InstanceWebClient.builder().filter(rewriteEndpointUrl()).filter(retry(0, singletonMap(Endpoint.HEALTH, 1))).filter(timeout(Duration.ofSeconds(2), emptyMap())).build());
}
Aggregations