remove unused code

This commit is contained in:
Xavier Léauté 2014-11-06 17:18:40 -08:00
parent f69f3cfc5a
commit a5f98be457
1 changed files with 1 additions and 17 deletions

View File

@ -18,9 +18,7 @@
*/ */
package io.druid.metadata; package io.druid.metadata;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Suppliers; import com.google.common.base.Suppliers;
import io.druid.jackson.DefaultObjectMapper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -32,22 +30,13 @@ import java.util.LinkedList;
public class SQLMetadataConnectorTest public class SQLMetadataConnectorTest
{ {
private static final ObjectMapper jsonMapper = new DefaultObjectMapper();
private TestDerbyConnector connector; private TestDerbyConnector connector;
private MetadataStorageTablesConfig tablesConfig = MetadataStorageTablesConfig.fromBase("test"); private MetadataStorageTablesConfig tablesConfig = MetadataStorageTablesConfig.fromBase("test");
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
MetadataStorageConnectorConfig config = jsonReadWriteRead(
"{"
+ "\"type\" : \"db\",\n"
+ "\"segmentTable\" : \"segments\"\n"
+ "}",
MetadataStorageConnectorConfig.class
);
connector = new TestDerbyConnector( connector = new TestDerbyConnector(
Suppliers.ofInstance(config), Suppliers.ofInstance(new MetadataStorageConnectorConfig()),
Suppliers.ofInstance(tablesConfig) Suppliers.ofInstance(tablesConfig)
); );
} }
@ -131,9 +120,4 @@ public class SQLMetadataConnectorTest
} }
); );
} }
private <T> T jsonReadWriteRead(String s, Class<T> klass) throws Exception
{
return jsonMapper.readValue(jsonMapper.writeValueAsBytes(jsonMapper.readValue(s, klass)), klass);
}
} }