use of com.hortonworks.registries.schemaregistry.avro.conf.SchemaRegistryTestConfiguration in project registry by hortonworks.
the class CustomStateTransitionTest method startUp.
@Before
public void startUp() throws Exception {
String serverYAMLPath = CustomStateTransitionTest.class.getClassLoader().getResource("registry-lifecycle-test-example.yaml").getPath();
String clientYAMLPath = CustomStateTransitionTest.class.getClassLoader().getResource("registry-lifecycle-client.yaml").getPath();
schemaRegistryTestServerClientWrapper = new SchemaRegistryTestServerClientWrapper(new SchemaRegistryTestConfiguration(serverYAMLPath, clientYAMLPath));
schemaRegistryTestServerClientWrapper.startTestServer();
schemaRegistryClient = schemaRegistryTestServerClientWrapper.getClient();
}
use of com.hortonworks.registries.schemaregistry.avro.conf.SchemaRegistryTestConfiguration in project registry by hortonworks.
the class LocalRegistryServerHATest method startZooKeeper.
@Before
public void startZooKeeper() throws Exception {
testingServer = new TestingServer(true);
File serverYAMLFile = new File(SCHEMA_REGISTRY_TEST_CONFIGURATION.getServerYAMLPath());
String fileContent = FileUtils.readFileToString(serverYAMLFile, "UTF-8");
File registryConfigFile = File.createTempFile("ha-", ".yaml");
registryConfigFile.deleteOnExit();
try (FileWriter writer = new FileWriter(registryConfigFile)) {
IOUtils.write(fileContent.replace("__zk_connect_url__", testingServer.getConnectString()), writer);
}
SchemaRegistryTestConfiguration testConfiguration = new SchemaRegistryTestConfiguration(registryConfigFile.getAbsolutePath(), SCHEMA_REGISTRY_TEST_CONFIGURATION.getClientYAMLPath());
List<SchemaRegistryTestServerClientWrapper> schemaRegistryServers = new ArrayList<>();
for (int i = 1; i < 4; i++) {
SchemaRegistryTestServerClientWrapper server = new SchemaRegistryTestServerClientWrapper(testConfiguration);
schemaRegistryServers.add(server);
server.startTestServer();
}
registryServers = Collections.unmodifiableList(schemaRegistryServers);
}
Aggregations