Search in sources :

Example 1 with LiveReloadingChannel

use of com.palantir.dialogue.clients.ReloadingClientFactory.LiveReloadingChannel in project dialogue by palantir.

the class ReloadingClientFactoryTest method live_reloading_wrapper_still_uses_the_EndpointChannelFactory_channel.

@Test
void live_reloading_wrapper_still_uses_the_EndpointChannelFactory_channel() {
    LiveReloadingChannel live = new LiveReloadingChannel(Refreshable.create(channel), runtime.clients());
    assertThat(SampleServiceAsync.of((Channel) live, runtime).getMyAlias()).isNotDone();
    // ensure we use the bind method
    verify(channel, atLeastOnce()).endpoint(any());
}
Also used : LiveReloadingChannel(com.palantir.dialogue.clients.ReloadingClientFactory.LiveReloadingChannel) LiveReloadingChannel(com.palantir.dialogue.clients.ReloadingClientFactory.LiveReloadingChannel) Channel(com.palantir.dialogue.Channel) EndpointChannel(com.palantir.dialogue.EndpointChannel) Test(org.junit.jupiter.api.Test)

Example 2 with LiveReloadingChannel

use of com.palantir.dialogue.clients.ReloadingClientFactory.LiveReloadingChannel in project dialogue by palantir.

the class ReloadingClientFactoryTest method live_reloading_wrapper_still_uses_the_EndpointChannelFactory_factory.

@Test
void live_reloading_wrapper_still_uses_the_EndpointChannelFactory_factory() {
    LiveReloadingChannel live = new LiveReloadingChannel(Refreshable.only(channel), runtime.clients());
    assertThat(SampleServiceAsync.of((EndpointChannelFactory) live, runtime).getMyAlias()).isNotDone();
    // ensure we use the bind method
    verify(channel, atLeastOnce()).endpoint(any());
}
Also used : LiveReloadingChannel(com.palantir.dialogue.clients.ReloadingClientFactory.LiveReloadingChannel) EndpointChannelFactory(com.palantir.dialogue.EndpointChannelFactory) Test(org.junit.jupiter.api.Test)

Aggregations

LiveReloadingChannel (com.palantir.dialogue.clients.ReloadingClientFactory.LiveReloadingChannel)2 Test (org.junit.jupiter.api.Test)2 Channel (com.palantir.dialogue.Channel)1 EndpointChannel (com.palantir.dialogue.EndpointChannel)1 EndpointChannelFactory (com.palantir.dialogue.EndpointChannelFactory)1