Просмотр исходного кода

AMBARI-25562 Nightly test is failing due to Ambari Metrics Host Aggregator (santal via dgrinenko) (#3234)

Szilárd Antal 5 лет назад
Родитель
Сommit
0e435df572

+ 13 - 6
ambari-metrics/ambari-metrics-host-aggregator/pom.xml

@@ -32,6 +32,7 @@
     <name>Ambari Metrics Host Aggregator</name>
 
     <properties>
+        <jersey.version>1.19.4</jersey.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
 
@@ -54,12 +55,18 @@
         <dependency>
             <groupId>com.sun.jersey</groupId>
             <artifactId>jersey-json</artifactId>
-            <version>1.11</version>
+            <version>${jersey.version}</version>
         </dependency>
         <dependency>
             <groupId>com.sun.jersey</groupId>
             <artifactId>jersey-server</artifactId>
-            <version>1.11</version>
+            <version>${jersey.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>asm</groupId>
+                    <artifactId>asm</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>javax.xml.bind</groupId>
@@ -69,7 +76,7 @@
         <dependency>
             <groupId>com.sun.jersey</groupId>
             <artifactId>jersey-core</artifactId>
-            <version>1.11</version>
+            <version>${jersey.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
@@ -79,13 +86,13 @@
         <dependency>
             <groupId>com.sun.jersey.jersey-test-framework</groupId>
             <artifactId>jersey-test-framework-core</artifactId>
-            <version>1.11</version>
+            <version>${jersey.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>com.sun.jersey.jersey-test-framework</groupId>
             <artifactId>jersey-test-framework-grizzly2</artifactId>
-            <version>1.11</version>
+            <version>${jersey.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -97,7 +104,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.2</version>
+            <version>4.13</version>
             <scope>test</scope>
         </dependency>
         <dependency>

+ 1 - 0
ambari-metrics/ambari-metrics-host-aggregator/src/test/java/org/apache/hadoop/metrics2/host/aggregator/AggregatorWebServiceTest.java

@@ -85,6 +85,7 @@ public class AggregatorWebServiceTest extends JerseyTest {
         TimelineMetrics timelineMetrics = TimelineMetricsHolderTest.getTimelineMetricsWithAppID("appid");
         WebResource r = resource();
         ClientResponse response = r.path("ws").path("v1").path("timeline").path("metrics")
+                .type(MediaType.APPLICATION_JSON)
                 .accept(MediaType.TEXT_PLAIN)
                 .post(ClientResponse.class, timelineMetrics);
         assertEquals(200, response.getStatus());