aboutsummaryrefslogtreecommitdiffstats
path: root/container-messagebus/src/main/java/com/yahoo/messagebus/jdisc/test/TestUtils.java
blob: 127eef7353b723013e9396469c20da4693b844a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.messagebus.jdisc.test;

import com.yahoo.cloud.config.SlobroksConfig;
import com.yahoo.jrt.Spec;
import com.yahoo.jrt.slobrok.server.Slobrok;

/**
 * @author jonmv
 */
public class TestUtils {

    private TestUtils() { }

    public static SlobroksConfig configFor(Slobrok slobrok) {
        return new SlobroksConfig.Builder().slobrok(new SlobroksConfig.Slobrok.Builder()
                                                            .connectionspec(new Spec("localhost", slobrok.port()).toString()))
                                           .build();
    }

}