Skip to content

Commit

Permalink
Merge pull request apache#2247 from metamx/pedanticBuild
Browse files Browse the repository at this point in the history
Enable strict building in travis
  • Loading branch information
xvrl committed Jan 27, 2016
2 parents e3d1e07 + 71dbe5c commit 5a3642b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ jdk:
- oraclejdk7
- oraclejdk8

script:
- mvn test -B
- mvn clean -Pstrict compile test-compile -B

after_success:
- mvn clean cobertura:cobertura coveralls:report -pl '!benchmarks,!distribution'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public long populate(final ByteSource source, final Map<K, V> map) throws IOExce
return source.asCharSource(Charsets.UTF_8).readLines(
new LineProcessor<Long>()
{
private long count = 0l;
private long count = 0L;

@Override
public boolean processLine(String line) throws IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public void testRunCount()
new URIExtractionNamespace.ObjectMapperFlatDataParser(
URIExtractionNamespaceTest.registerTypes(new ObjectMapper())
),
new Period(5l),
new Period(5L),
null
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class LongMaxAggregationTest
private ColumnSelectorFactory colSelectorFactory;
private TestLongColumnSelector selector;

private long[] values = {9223372036854775802l, 9223372036854775803l, 9223372036854775806l, 9223372036854775805l};
private long[] values = {9223372036854775802L, 9223372036854775803L, 9223372036854775806L, 9223372036854775805L};

public LongMaxAggregationTest() throws Exception
{
Expand Down Expand Up @@ -95,7 +95,7 @@ public void testLongMaxBufferAggregator()
@Test
public void testCombine()
{
Assert.assertEquals(9223372036854775803l, longMaxAggFactory.combine(9223372036854775800l, 9223372036854775803l));
Assert.assertEquals(9223372036854775803L, longMaxAggFactory.combine(9223372036854775800L, 9223372036854775803L));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class LongMinAggregationTest
private ColumnSelectorFactory colSelectorFactory;
private TestLongColumnSelector selector;

private long[] values = {-9223372036854775802l, -9223372036854775803l, -9223372036854775806l, -9223372036854775805l};
private long[] values = {-9223372036854775802L, -9223372036854775803L, -9223372036854775806L, -9223372036854775805L};

public LongMinAggregationTest() throws Exception
{
Expand Down Expand Up @@ -95,7 +95,7 @@ public void testLongMinBufferAggregator()
@Test
public void testCombine()
{
Assert.assertEquals(-9223372036854775803l, longMinAggFactory.combine(-9223372036854775800l, -9223372036854775803l));
Assert.assertEquals(-9223372036854775803L, longMinAggFactory.combine(-9223372036854775800L, -9223372036854775803L));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ public void testTopNDimExtractionToOne() throws IOException
"index", 503332.5071372986D,
QueryRunnerTestHelper.marketDimension, "POTATO",
"uniques", QueryRunnerTestHelper.UNIQUES_9,
"rows", 1209l
"rows", 1209L
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ public void testMismatchedDimensions() throws IOException, IndexSizeExceededExce
new LongSumAggregatorFactory("A", "A"),
new LongSumAggregatorFactory("C", "C")
});
index2.add(new MapBasedInputRow(1l, Lists.newArrayList("d2"), ImmutableMap.<String, Object>of("d2", "z", "A", 2, "C", 100)));
index2.add(new MapBasedInputRow(1L, Lists.newArrayList("d2"), ImmutableMap.<String, Object>of("d2", "z", "A", 2, "C", 100)));
closer.closeLater(index2);

Interval interval = new Interval(0, new DateTime().getMillis());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public void childEvent(
}
Map segmentAvailability = coordinator.getSegmentAvailability().snapshot();
Assert.assertEquals(1, segmentAvailability.size());
Assert.assertEquals(0l, segmentAvailability.get(dataSource));
Assert.assertEquals(0L, segmentAvailability.get(dataSource));

while (coordinator.getLoadPendingDatasources().get(dataSource).get() > 0) {
Thread.sleep(50);
Expand All @@ -370,7 +370,7 @@ public void childEvent(
Assert.assertNotNull(dataSourceMap.get(dataSource));
// Simulated the adding of segment to druidServer during SegmentChangeRequestLoad event
// The load rules asks for 2 replicas, therefore 1 replica should still be pending
Assert.assertEquals(1l, dataSourceMap.get(dataSource).get());
Assert.assertEquals(1L, dataSourceMap.get(dataSource).get());
coordinator.stop();
leaderUnannouncerLatch.await();
Assert.assertFalse(coordinator.isLeader());
Expand Down

0 comments on commit 5a3642b

Please sign in to comment.