martin-g commented on a change in pull request #340:
URL: https://github.com/apache/flume/pull/340#discussion_r600426819



##########
File path: 
flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java
##########
@@ -301,8 +301,10 @@ public void testClientHeaders() throws IOException {
 
     Map<String, String> headers = e.getHeaders();
 
-    checkHeader(headers, testClientIPHeader, 
InetAddress.getLoopbackAddress().getHostAddress());
-    checkHeader(headers, testClientHostnameHeader, 
InetAddress.getLoopbackAddress().getHostName());
+    InetAddress loopbackAddress = InetAddress.getLoopbackAddress();

Review comment:
       At TravisCI `InetAddress.getLoopbackAddress().getHostName()` returns 
`127.0.0.1`. 
   Inet**Socket**Address.getHostName() returns `localhost`.
   I.e. the test uses `SyslogUtils.getHostname(SocketAddress)` as 
SyslogUdpSource does.

##########
File path: .travis.yml
##########
@@ -15,13 +15,32 @@
 # specific language governing permissions and limitations
 # under the License.
 
-dist: trusty
-language: java
-jdk:
-  - oraclejdk8
+language: generic
+
+jobs:
+  include:
+    - name: "Linux amd64"
+      arch: amd64
+      dist: bionic
+    - name: "Linux aarch64"
+      arch: arm64-graviton2
+      dist: focal
+      virt: lxd
+      group: edge
+
+cache:
+  directories:
+    - $HOME/.m2
+
 before_install:
   - export MAVEN_SKIP_RC="true" # Travis has settings in /etc/mavenrc. We want 
to override them. See https://github.com/travis-ci/travis-ci/issues/4613
-install:
-  - # Skip mvn install. See https://docs.travis-ci.com/user/languages/java/
+  - sudo apt update
+  - sudo apt install -y openjdk-8-jdk

Review comment:
       Manually install OpenJDK 8 because it is not available on TravisCI ARM64 
nodes. The oldest supported one is JDK 11

##########
File path: 
flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUtils.java
##########
@@ -633,7 +634,9 @@ public void testGetHostnameWhenSuccessful() {
 
     String hostname = SyslogUtils.getHostname(socketAddress);
 
-    assertEquals("localhost", hostname);
+    if (!"localhost".equals(hostname) && !"127.0.0.1".equals(hostname)) {

Review comment:
       At TravisCI InetAddress.getLoopbackAddress().getHostName() returns 
127.0.0.1.

##########
File path: flume-ng-sinks/flume-ng-kafka-sink/pom.xml
##########
@@ -65,6 +65,11 @@
       <artifactId>flume-shared-kafka</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>io.dropwizard.metrics</groupId>
+      <artifactId>metrics-core</artifactId>
+    </dependency>

Review comment:
       Kafka needs Dropwizard Metrics' `Reservoir` class.

##########
File path: 
flume-ng-core/src/test/java/org/apache/flume/source/http/TestHTTPSource.java
##########
@@ -194,6 +195,14 @@ public void setUp() {
     HttpClientBuilder builder = HttpClientBuilder.create();
     httpClient = builder.build();
     postRequest = new HttpPost("http://0.0.0.0:"; + httpPort);
+    SourceCounter sc = (SourceCounter) Whitebox.getInternalState(httpSource, 
"sourceCounter");
+    sc.start();
+  }
+
+  @After
+  public void tearDown() {
+    SourceCounter sc = (SourceCounter) Whitebox.getInternalState(httpSource, 
"sourceCounter");
+    sc.stop();

Review comment:
       The reset of the counter is needed to be able to count for each `@Test` 
method separately.

##########
File path: flume-ng-sinks/flume-dataset-sink/pom.xml
##########
@@ -73,12 +73,6 @@ limitations under the License.
       <artifactId>avro</artifactId>
     </dependency>
 
-    <dependency>

Review comment:
       Removed this dependency because:
   - it seems to be not needed
   - it brings org/apache/avro/** classes and clashes with the explicit 
dependency above 

##########
File path: flume-ng-sinks/flume-ng-kudu-sink/pom.xml
##########
@@ -159,6 +159,7 @@
       <activation>
         <os>
           <family>Unix</family>
+          <arch>amd64</arch>

Review comment:
       At the moment there is kudu-binary.jar only for Linux and Mac x86_64: 
https://repo1.maven.org/maven2/org/apache/kudu/kudu-binary/1.14.0/
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to