use of com.baidu.hugegraph.config.ConfigOption in project hugegraph-computer by hugegraph.
the class AbstractNetworkTest method setup.
@Before
public void setup() {
Configurator.setAllLevels("com.baidu.hugegraph", Level.DEBUG);
OPTIONS.put(ComputerOptions.TRANSPORT_SERVER_HOST, host);
OPTIONS.put(ComputerOptions.TRANSPORT_IO_MODE, "AUTO");
OPTIONS.put(ComputerOptions.TRANSPORT_SERVER_PORT, "0");
this.initOption();
Object[] objects = new Object[OPTIONS.size() * 2];
Set<Map.Entry<ConfigOption<?>, String>> kvs = OPTIONS.entrySet();
int i = 0;
for (Map.Entry<ConfigOption<?>, String> kv : kvs) {
objects[i++] = kv.getKey();
objects[i++] = kv.getValue();
}
config = UnitTestBase.updateWithRequiredOptions(objects);
conf = TransportConf.wrapConfig(config);
serverHandler = Mockito.spy(new MockMessageHandler());
clientHandler = Mockito.spy(new MockClientHandler());
connectionManager = new TransportConnectionManager();
port = connectionManager.startServer(config, serverHandler);
connectionManager.initClientManager(config, clientHandler);
this.mockSpyProtocol();
}
Aggregations