1) Fix stray imports from libraries that aren't depended on and fix annotations/methods accordingly.

This commit is contained in:
cheddar 2013-07-10 14:19:04 -07:00
parent 3778425250
commit c519be5b9f
4 changed files with 13 additions and 10 deletions

View File

@ -21,8 +21,8 @@ package druid.examples.web;
import com.google.common.io.InputSupplier;
import junit.framework.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
@ -38,7 +38,7 @@ public class InputSupplierUpdateStreamTest
Map<String, Object> expectedAnswer = new HashMap<String, Object>();
String timeDimension;
@BeforeClass
@Before
public void setUp()
{
timeDimension = "time";

View File

@ -21,8 +21,8 @@ package druid.examples.web;
import com.google.common.io.InputSupplier;
import junit.framework.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.junit.Before;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
@ -35,7 +35,7 @@ public class RenamingKeysUpdateStreamTest
private InputSupplier testCaseSupplier;
String timeDimension;
@BeforeClass
@Before
public void setUp()
{
timeDimension = "time";

View File

@ -24,6 +24,9 @@ import com.google.common.collect.Lists;
import com.metamx.druid.input.InputRow;
import com.metamx.druid.realtime.firehose.Firehose;
import org.joda.time.DateTime;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.Collections;
import java.util.List;
@ -36,7 +39,7 @@ public class WebFirehoseFactoryTest
private WebFirehoseFactory webbie;
private WebFirehoseFactory webbie1;
@BeforeClass
@Before
public void setUp() throws Exception
{
dimensions.add("item1");
@ -185,7 +188,7 @@ public class WebFirehoseFactoryTest
throw new RuntimeException("queue is empty");
}
Assert.assertEquals((float) 2.0, inputRow.getFloatMetric("item2"));
Assert.assertEquals((float) 2.0, inputRow.getFloatMetric("item2"), 0.0f);
}
private static class MyUpdateStream implements UpdateStream

View File

@ -19,13 +19,13 @@
package druid.examples.web;
import org.testng.annotations.Test;
import org.junit.Test;
import java.net.UnknownHostException;
public class WebJsonSupplierTest
{
@Test(expectedExceptions = UnknownHostException.class)
@Test(expected = UnknownHostException.class)
public void checkInvalidUrl() throws Exception
{