Search in sources :

Example 31 with PhysicalSourceConfig

use of com.linkedin.databus2.relay.config.PhysicalSourceConfig in project databus by linkedin.

the class TestDbusPhysicalPartitionEventBuffer method deserializePhysicalSourceConfigWithEbuffer.

@Test
public void deserializePhysicalSourceConfigWithEbuffer() throws JSONException, JsonParseException, JsonMappingException, IOException {
    JSONObject jsonObject = new JSONObject(PhysicalSourcesConfigWithEBuffer.toString());
    Assert.assertNotEquals(jsonObject.get("dbusEventBuffer"), JSONObject.NULL);
    ObjectMapper mapper = new ObjectMapper();
    PhysicalSourceConfig config = mapper.readValue(jsonObject.toString(), PhysicalSourceConfig.class);
    //System.out.println(config.toString());
    Assert.assertEquals(config.isDbusEventBufferSet(), true);
}
Also used : PhysicalSourceConfig(com.linkedin.databus2.relay.config.PhysicalSourceConfig) JSONObject(org.json.JSONObject) ObjectMapper(org.codehaus.jackson.map.ObjectMapper) Test(org.testng.annotations.Test)

Aggregations

PhysicalSourceConfig (com.linkedin.databus2.relay.config.PhysicalSourceConfig)28 Test (org.testng.annotations.Test)16 Checkpoint (com.linkedin.databus.core.Checkpoint)13 DatabusSourcesConnection (com.linkedin.databus.client.DatabusSourcesConnection)12 DbusEventsTotalStats (com.linkedin.databus.core.monitoring.mbean.DbusEventsTotalStats)12 DatabusRelayTestUtil (com.linkedin.databus2.relay.util.test.DatabusRelayTestUtil)12 LogicalSourceConfig (com.linkedin.databus2.relay.config.LogicalSourceConfig)11 InvalidConfigException (com.linkedin.databus.core.util.InvalidConfigException)10 DatabusException (com.linkedin.databus2.core.DatabusException)8 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)7 PhysicalSourceStaticConfig (com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig)6 File (java.io.File)5 Logger (org.apache.log4j.Logger)5 ConditionCheck (com.linkedin.databus2.test.ConditionCheck)4 OracleTriggerMonitoredSourceInfo (com.linkedin.databus2.producers.db.OracleTriggerMonitoredSourceInfo)3 FileSystemSchemaRegistryService (com.linkedin.databus2.schemas.FileSystemSchemaRegistryService)3 IOException (java.io.IOException)3 BootstrapConfig (com.linkedin.databus.bootstrap.common.BootstrapConfig)2 BootstrapReadOnlyConfig (com.linkedin.databus.bootstrap.common.BootstrapReadOnlyConfig)2 HttpRelay (com.linkedin.databus.container.netty.HttpRelay)2