Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,17 @@ jobs:
after_success:
- (cd web-console && travis_retry npm run codecov) # retry in case of network error

- name: "Build and test on ARM64 CPU architecture"
stage: Tests - phase 2
arch: arm64-graviton2
dist: focal
virt: vm
group: edge
jdk: openjdk11
env:
- MAVEN_PROJECTS='core,indexing-hadoop,indexing-service,processing,server,services'
script: ${MVN} test -B -pl ${MAVEN_PROJECTS} -Ddruid.console.skip=true -DargLine=-Xmx3000m -T1C

- name: "web console end-to-end test"
before_install: *setup_generate_license
install: web-console/script/druid build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,22 @@
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.emitter.core.Event;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

import java.util.List;

public class MonitorsTest
{
private static final String CPU_ARCH = System.getProperty("os.arch");

@Before
public void before()
{
// Do not run the tests on ARM64. Sigar library has no binaries for ARM64
Assume.assumeFalse("aarch64".equals(CPU_ARCH));
}

@Test
public void testSetFeed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,23 @@

package org.apache.druid.java.util.metrics;

import junit.framework.Assert;
import org.hyperic.sigar.Sigar;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

public class SigarLoadTest
{
private static final String CPU_ARCH = System.getProperty("os.arch");

@Before
public void before()
{
// Do not run the tests on ARM64. Sigar library has no binaries for ARM64
Assume.assumeFalse("aarch64".equals(CPU_ARCH));
}

@Test
public void testSigarLoad()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

package org.apache.druid.java.util.metrics;

import org.junit.Assume;
import org.junit.Test;

public class SigarPidDiscovererTest
{
private static final String CPU_ARCH = System.getProperty("os.arch");

@Test
public void simpleTest()
{
// Do not run the tests on ARM64. Sigar library has no binaries for ARM64
Assume.assumeFalse("aarch64".equals(CPU_ARCH));

// Just make sure we don't crash
SigarPidDiscoverer.instance().getPid();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.java.util.common.Intervals;
import org.apache.druid.query.filter.SelectorDimFilter;
import org.apache.druid.segment.TestHelper;
import org.apache.druid.timeline.DataSegment;
import org.joda.time.Interval;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.util.List;
Expand All @@ -38,6 +40,12 @@ public class DatasourceIngestionSpecTest
{
private static final ObjectMapper MAPPER = TestHelper.makeJsonMapper();

@Before
public void before()
{
NullHandling.initializeForTests();
}

@Test
public void testSingleIntervalSerde() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.apache.druid.segment.virtual;

import com.google.common.collect.ImmutableList;
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.common.granularity.Granularities;
import org.apache.druid.java.util.common.guava.Sequence;
import org.apache.druid.java.util.common.io.Closer;
Expand Down Expand Up @@ -48,6 +47,7 @@
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
Expand Down Expand Up @@ -96,25 +96,31 @@ public class ExpressionVectorSelectorsTest
private static QueryableIndex INDEX;
private static Closer CLOSER;

private static final String CPU_ARCH = System.getProperty("os.arch");

@BeforeClass
public static void setupClass()
{
CLOSER = Closer.create();

final GeneratorSchemaInfo schemaInfo = GeneratorBasicSchemas.SCHEMA_MAP.get("expression-testbench");
// Do not run the tests on ARM64.
// SegmentGenerator#generate() fails with OutOfMemoryError on TravisCI ARM64
if (!"aarch64".equals(CPU_ARCH)) {
final GeneratorSchemaInfo schemaInfo = GeneratorBasicSchemas.SCHEMA_MAP.get("expression-testbench");

final DataSegment dataSegment = DataSegment.builder()
.dataSource("foo")
.interval(schemaInfo.getDataInterval())
.version("1")
.shardSpec(new LinearShardSpec(0))
.size(0)
.build();
final DataSegment dataSegment = DataSegment.builder()
.dataSource("foo")
.interval(schemaInfo.getDataInterval())
.version("1")
.shardSpec(new LinearShardSpec(0))
.size(0)
.build();

final SegmentGenerator segmentGenerator = CLOSER.register(new SegmentGenerator());
INDEX = CLOSER.register(
segmentGenerator.generate(dataSegment, schemaInfo, Granularities.HOUR, ROWS_PER_SEGMENT)
);
final SegmentGenerator segmentGenerator = CLOSER.register(new SegmentGenerator());
INDEX = CLOSER.register(
segmentGenerator.generate(dataSegment, schemaInfo, Granularities.HOUR, ROWS_PER_SEGMENT)
);
}
}

@AfterClass
Expand All @@ -140,6 +146,9 @@ public ExpressionVectorSelectorsTest(String expression)
@Before
public void setup()
{
// Don't run the tests on ARM64. @BeforeClass fails with OutOfMemoryError on TravisCI
Assume.assumeFalse("aarch64".equals(CPU_ARCH));

Expr parsed = Parser.parse(expression, ExprMacroTable.nil());
outputType = parsed.getOutputType(
new ColumnInspector()
Expand Down Expand Up @@ -269,7 +278,7 @@ public static void sanityTestVectorizedExpressionSelectors(
int rows = 0;
while (!nonVectorized.isDone()) {
Assert.assertEquals(
StringUtils.format("Failed at row %s", rows),
"Failed at row " + rows,
nonSelector.getObject(),
results.get(rows)
);
Expand Down