Skip to content

Commit

Permalink
#199 update dependent packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Avetisyan committed Aug 3, 2017
1 parent 2cd19d2 commit 827e833
Show file tree
Hide file tree
Showing 17 changed files with 101 additions and 79 deletions.
2 changes: 1 addition & 1 deletion assembly/zms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion assembly/zts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.yahoo.athenz.zpe;

import java.io.IOException;
import junit.framework.TestCase;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand All @@ -31,7 +30,10 @@
import com.yahoo.athenz.zts.DomainMetrics;
import com.yahoo.rdl.JSON;

public class TestZpeMetric extends TestCase {
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertEquals;

public class TestZpeMetric {

@Test
public void testZpeMetric() throws IOException {
Expand Down
2 changes: 1 addition & 1 deletion clients/java/zts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.135</version>
<version>${aws.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion containers/jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
<version>${logback.version}</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void testSignedDomainsMethod() {
//assertTrue(result.valid, result.error);

assertEquals(e.getName(), "test.entity");
assertEquals(e.getValue(), new Struct().with("key", (Object) "test"));
assertTrue(e.getValue().equals(new Struct().with("key", (Object) "test")));

Entity e2 = new Entity().setName("test.entity").setValue(new Struct().with("key", "test"));
assertTrue(e2.equals(e));
Expand Down
20 changes: 9 additions & 11 deletions core/zts/src/test/java/com/yahoo/athenz/zts/DomainMetricTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

import org.testng.annotations.Test;

import junit.framework.Assert;

public class DomainMetricTest {

@Test
Expand All @@ -36,9 +34,9 @@ public void testsetgetMetricType() {
dm.setMetricType(DomainMetricType.ACCESS_ALLOWED);
dm.setMetricVal(1);

Assert.assertEquals(DomainMetricType.ACCESS_ALLOWED, dm.getMetricType());
Assert.assertEquals(1, dm.getMetricVal());
Assert.assertEquals(DomainMetricType.ACCESS_ALLOWED, DomainMetricType.fromString("ACCESS_ALLOWED"));
assertEquals(DomainMetricType.ACCESS_ALLOWED, dm.getMetricType());
assertEquals(1, dm.getMetricVal());
assertEquals(DomainMetricType.ACCESS_ALLOWED, DomainMetricType.fromString("ACCESS_ALLOWED"));
}

@Test(expectedExceptions = { java.lang.IllegalArgumentException.class })
Expand All @@ -56,17 +54,17 @@ public void testMetricTypeEqualsTrueFalse() {
dm2.setMetricType(DomainMetricType.ACCESS_ALLOWED);
dm2.setMetricVal(1);

Assert.assertTrue(dm1.equals(dm2));
assertTrue(dm1.equals(dm2));

// change value
dm2.setMetricVal(0);
Assert.assertFalse(dm1.equals(dm2));
assertFalse(dm1.equals(dm2));

// change type
dm1.setMetricType(DomainMetricType.ACCESS_ALLOWED_DENY);
Assert.assertFalse(dm1.equals(dm2));
assertFalse(dm1.equals(dm2));

Assert.assertFalse(dm1.equals(new String()));
assertFalse(dm1.equals(new String()));
}

@Test
Expand All @@ -90,12 +88,12 @@ public void testDomainMetrics() {

//// equals
// true case
Assert.assertTrue(dms1.equals(dms1));
assertTrue(dms1.equals(dms1));
assertTrue(dms1.equals(dms2));

// false case
dms2.setMetricList(new ArrayList<DomainMetric>());
Assert.assertFalse(dms1.equals(dms2));
assertFalse(dms1.equals(dms2));

dms2.setDomainName("test.net");
assertFalse(dms1.equals(dms2));
Expand Down
2 changes: 1 addition & 1 deletion libs/java/auth_core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>libpam4j</artifactId>
<version>1.6</version>
<version>1.8</version>
</dependency>
</dependencies>

Expand Down
8 changes: 4 additions & 4 deletions libs/java/server_common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,22 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.41</version>
<version>5.1.43</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.0.1</version>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.2</version>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
<version>1.2</version>
</dependency>
</dependencies>

Expand Down
17 changes: 10 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@

<properties>
<jetty.version>9.4.6.v20170531</jetty.version>
<jersey.version>2.23.2</jersey.version>
<jackson.version>2.5.4</jackson.version>
<jersey.version>2.25.1</jersey.version>
<jackson.version>2.9.0</jackson.version>
<rdl.version>1.4.14</rdl.version>
<bouncycastle.version>1.55</bouncycastle.version>
<bouncycastle.version>1.57</bouncycastle.version>
<aws.version>1.11.172</aws.version>
<guava.version>22.0</guava.version>
<logback.version>1.2.3</logback.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand Down Expand Up @@ -171,24 +174,24 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3.1</version>
<version>6.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion servers/zms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import junit.framework.TestCase;

public class DBServiceTest extends TestCase {
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.fail;

public class DBServiceTest {

@Mock FileConnection mockFileConn;
@Mock ObjectStore mockObjStore;
Expand Down
Loading

0 comments on commit 827e833

Please sign in to comment.