summaryrefslogtreecommitdiffstats
path: root/service-monitor/src/test/java/com/yahoo/vespa/service/monitor/SlobrokMonitorTest.java
blob: 2cbe48c7be51f745d8488d6d40e0b8984611e345 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.service.monitor;

import com.yahoo.config.model.api.ApplicationInfo;
import com.yahoo.jrt.slobrok.api.Mirror;
import com.yahoo.jrt.slobrok.api.SlobrokList;
import org.junit.Test;

import static org.mockito.Mockito.mock;

public class SlobrokMonitorTest {
    private final SlobrokList slobrokList = mock(SlobrokList.class);
    private final Mirror mirror = mock(Mirror.class);
    private SlobrokMonitor slobrokMonitor = new SlobrokMonitor(slobrokList, mirror);

    @Test
    public void testUpdateSlobrokList() {
        ApplicationInfo applicationInfo = ExampleModel.createApplication(
                "tenant",
                "application-name")
                .build();
    }

    @Test
    public void testUpdateSlobrokList2() {
        /*
        final String hostname = "hostname";
        final int port = 1;

        SuperModel superModel = ExampleModel.createExampleSuperModelWithOneRpcPort(hostname, port);
        slobrokMonitor.updateSlobrokList(superModel.getApplicationInfo());

        String[] expectedSpecs = new String[] {"tcp/" + hostname + ":" + port};
        verify(slobrokList).setup(expectedSpecs); */
    }
}