Skip to content

Commit

Permalink
ATLAS-4923: Bump versions of commons-fileupload, jetty, testng
Browse files Browse the repository at this point in the history
Signed-off-by: Madhan Neethiraj <[email protected]>
  • Loading branch information
dependabot[bot] authored and mneethiraj committed Nov 18, 2024
1 parent 7716f88 commit 636c2b7
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
package org.apache.atlas.hbase;

import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.testng.annotations.Test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.ServerSocket;
import java.util.List;

import static org.testng.AssertJUnit.assertFalse;
Expand All @@ -34,26 +32,38 @@
* Make sure we can spin up a HBTU without a hbase-site.xml
*/
public class TestHBaseTestingUtilSpinup {
private static final Logger LOG = LoggerFactory.getLogger(TestHBaseTestingUtilSpinup.class);
private final static HBaseTestingUtility UTIL = new HBaseTestingUtility();

@BeforeClass
public static void beforeClass() throws Exception {
UTIL.startMiniCluster();
if (!UTIL.getHBaseCluster().waitForActiveAndReadyMaster(30000)) {
throw new RuntimeException("Active master not ready");
}
}
private final HBaseTestingUtility UTIL = new HBaseTestingUtility();

@AfterClass
public static void afterClass() throws Exception {
UTIL.shutdownMiniCluster();
public TestHBaseTestingUtilSpinup() throws Exception {
UTIL.getConfiguration().set("test.hbase.zookeeper.property.clientPort", String.valueOf(getFreePort()));
UTIL.getConfiguration().set("hbase.master.port", String.valueOf(getFreePort()));
UTIL.getConfiguration().set("hbase.master.info.port", String.valueOf(getFreePort()));
UTIL.getConfiguration().set("hbase.regionserver.port", String.valueOf(getFreePort()));
UTIL.getConfiguration().set("hbase.regionserver.info.port", String.valueOf(getFreePort()));
UTIL.getConfiguration().set("zookeeper.znode.parent", "/hbase-unsecure");
UTIL.getConfiguration().set("hbase.table.sanity.checks", "false");
}

@Test
public void testGetMetaTableRows() throws Exception {
List<byte[]> results = UTIL.getMetaTableRows();
assertFalse("results should have some entries and is empty.", results.isEmpty());
try (MiniHBaseCluster miniCluster = UTIL.startMiniCluster()) {
if (!UTIL.getHBaseCluster().waitForActiveAndReadyMaster(30000)) {
throw new RuntimeException("Active master not ready");
}

List<byte[]> results = UTIL.getMetaTableRows();
assertFalse("results should have some entries and is empty.", results.isEmpty());
} finally {
UTIL.shutdownMiniCluster();
}
}

private static int getFreePort() throws IOException {
ServerSocket serverSocket = new ServerSocket(0);
int port = serverSocket.getLocalPort();

serverSocket.close();

return port;
}
}
7 changes: 7 additions & 0 deletions addons/hive-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion graphdb/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ under the License. -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.0.0</version>
<version>7.5.1</version>
<scope>test</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@
<jersey.version>1.19</jersey.version>
<jettison.version>1.5.4</jettison.version>
<jetty-maven-plugin.stopWait>10</jetty-maven-plugin.stopWait>
<jetty.version>9.4.53.v20231009</jetty.version>
<jetty.version>9.4.56.v20240826</jetty.version>
<joda-time.version>2.10.6</joda-time.version>
<json.version>3.2.11</json.version>
<json-simple.version>1.1.1</json-simple.version>
Expand Down
2 changes: 1 addition & 1 deletion test-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
<version>1.5</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 636c2b7

Please sign in to comment.