use of org.apache.tinkerpop.gremlin.server.Settings in project janusgraph by JanusGraph.
the class JanusGraphGrpcServerBaseTest method getGraphManager.
protected static GraphManager getGraphManager() {
Settings settings = new Settings();
HashMap<String, String> map = new HashMap<>();
map.put("graph", "src/test/resources/janusgraph-inmemory.properties");
map.put("graph2", "src/test/resources/janusgraph-inmemory.properties");
map.put("tinkergraph", "src/test/resources/tinkergraph.properties");
settings.graphs = map;
return new DefaultGraphManager(settings);
}
use of org.apache.tinkerpop.gremlin.server.Settings in project janusgraph by JanusGraph.
the class AbstractConfiguredGraphFactoryTest method setup.
@BeforeEach
public void setup() {
if (gm != null)
return;
gm = new JanusGraphManager(new Settings());
final MapConfiguration config = getManagementConfig();
final StandardJanusGraph graph = new StandardJanusGraph(new GraphDatabaseConfigurationBuilder().build(new CommonsConfiguration(config)));
// Instantiate the ConfigurationManagementGraph Singleton
new ConfigurationManagementGraph(graph);
}
use of org.apache.tinkerpop.gremlin.server.Settings in project janusgraph by JanusGraph.
the class JanusGraphSettingsUtilsTest method testSetDefaultSerializers.
@Test
public void testSetDefaultSerializers() throws Exception {
Settings settings = JanusGraphSettings.read("src/test/resources/janusgraph-server-without-serializers.yaml");
assertEquals(5, settings.serializers.size());
}
use of org.apache.tinkerpop.gremlin.server.Settings in project janusgraph by JanusGraph.
the class JanusGraphSettingsUtilsTest method testDontOverwriteSerializers.
@Test
public void testDontOverwriteSerializers() throws Exception {
Settings settings = JanusGraphSettings.read("src/test/resources/janusgraph-server-with-serializers.yaml");
assertEquals(11, settings.serializers.size());
}
use of org.apache.tinkerpop.gremlin.server.Settings in project janusgraph by JanusGraph.
the class JanusGraphSettingsUtilsTest method testSetDefaultSerializersWithGraphSONWithRegistry.
@Test
public void testSetDefaultSerializersWithGraphSONWithRegistry() throws Exception {
Settings settings = JanusGraphSettings.read("src/test/resources/janusgraph-server-without-serializers.yaml");
Optional<Settings.SerializerSettings> graphson = settings.serializers.stream().filter(it -> it.className.equals("org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0") && it.config.get("ioRegistries") != null).findFirst();
assertTrue(graphson.isPresent());
assertTrue(((List) graphson.get().config.get("ioRegistries")).contains("org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry"));
}
Aggregations