Skip to content
Open
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
10 changes: 2 additions & 8 deletions .github/workflows/pxf-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,20 +319,17 @@ jobs:
- cli
- external-table
- fdw
- sanity
- smoke
- hdfs
- hcatalog
- hcfs
- hive
- hbase
- profile
- jdbc
- proxy
- unused
- features
- gpdb
- gpdb_fdw
- features_fdw
- load
steps:
- name: Free disk space
Expand Down Expand Up @@ -515,20 +512,17 @@ jobs:
- external-table
- fdw
- server
- sanity
- smoke
- hdfs
- hcatalog
- hcfs
- hive
- hbase
- profile
- jdbc
- proxy
- unused
- features
- gpdb
- gpdb_fdw
- features_fdw
- load
steps:
- name: Free disk space
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apache.cloudberry.pxf.automation.features.hdfs;

import annotations.SkipForFDW;
import annotations.WorksWithFDW;
import org.apache.cloudberry.pxf.automation.components.cluster.PhdCluster;
import org.apache.cloudberry.pxf.automation.datapreparer.CustomSequencePreparer;
Expand Down Expand Up @@ -219,6 +220,7 @@ public void analyzeOnText() throws Exception {
* @throws Exception if test failed to run
*/
@Test(groups = { "features" })
@SkipForFDW // relies on explicit fragmenter/accessor/resolver without a profile, unsupported by FDW
public void analyzeOnSequenceSmall() throws Exception {

String path = hdfs.getWorkingDirectory()
Expand Down Expand Up @@ -268,6 +270,7 @@ public void analyzeOnSequenceSmall() throws Exception {
* @throws Exception if test failed to run
*/
@Test(groups = { "features" })
@SkipForFDW // relies on explicit fragmenter/accessor/resolver without a profile, unsupported by FDW
public void negativeAnalyzeFailOnFragmenter() throws Exception {

String csvPath = hdfs.getWorkingDirectory() + "/analyze_nofragmenter.csv";
Expand Down Expand Up @@ -323,7 +326,6 @@ public void negativeAnalyzeFailOnFragmenter() throws Exception {
* @throws Exception if test failed to run
*/
@Test(groups = { "features" }, enabled = false)

public void negativeAnalyzeFailOnEstimate() throws Exception {

String csvPath = hdfs.getWorkingDirectory() + "/no_such_file.csv";
Expand Down Expand Up @@ -375,6 +377,7 @@ public void negativeAnalyzeFailOnEstimate() throws Exception {
* @throws Exception test failed to run
*/
@Test(groups = { "features" })
@SkipForFDW // relies on explicit fragmenter/accessor/resolver without a profile, unsupported by FDW
public void negativeAnalyzeFailOnResolver() throws Exception {

String csvPath = hdfs.getWorkingDirectory() + "/analyze_noresolver.csv";
Expand Down Expand Up @@ -454,6 +457,7 @@ public void negativeAnalyzeFailOnResolver() throws Exception {
* @throws Exception if test failed to run
*/
@Test(groups = { "features" })
@SkipForFDW // relies on explicit fragmenter/accessor/resolver without a profile, unsupported by FDW
public void negativeAnalyzeFailAfter10000Rows() throws Exception {

String dataPath = hdfs.getWorkingDirectory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected void beforeMethod() throws Exception {
* format.
*/
// TODO: pxf_regress shows diff for this test. Should be fixed.
@Test(enabled = false, groups = {"features", "sanity", "gpdb", "security"})
@Test(enabled = false, groups = {"features", "gpdb", "security"})
public void readDelimitedTextUsingTextFormat() throws Exception {
// set plugins and delimiter
exTable.setFragmenter("org.apache.cloudberry.pxf.plugins.hdfs.HdfsDataFragmenter");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void hiveAlterPartitionedFileFormats(HiveTable table) throws Exception {
*
* @throws Exception if test fails to run
*/
@Test(groups = {"hive", "sanity", "features", "gpdb", "security"})
@Test(groups = {"hive", "features", "gpdb", "security"})
public void sanity() throws Exception {

createExternalTable(PXF_HIVE_SMALL_DATA_TABLE, PXF_HIVE_SMALLDATA_COLS, hiveSmallDataTable);
Expand Down Expand Up @@ -951,7 +951,7 @@ public void hivePartitionedSkewedStoredAsDirsTable() throws Exception {
*
* @throws Exception if test fails to run
*/
@Test(groups = {"features", "hcatalog", "sanity"})
@Test(groups = {"features", "hcatalog"})
public void describeHiveTable() throws Exception {

prepareNonDefaultSchemaData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected void beforeClass() throws Exception {
*
* @throws Exception if test fails to run
*/
@Test(groups = {"sanity"})
@Test(groups = {"unused"})
protected void sanity() throws Exception {

gpdb.createTableAndVerify(exTable);
Expand Down
76 changes: 18 additions & 58 deletions ci/docker/pxf-cbdb-dev/common/script/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ base_test(){
export PATH="${GPHOME}/bin:${PATH}"
ensure_testuser_pg_hba

make GROUP="sanity" || true
save_test_reports "sanity"
echo "[run_tests] GROUP=sanity finished"

make GROUP="smoke" || true
save_test_reports "smoke"
echo "[run_tests] GROUP=smoke finished"
Expand Down Expand Up @@ -273,10 +269,6 @@ base_test(){
save_test_reports "profile"
echo "[run_tests] GROUP=profile finished"

make GROUP="jdbc" || true
save_test_reports "jdbc"
echo "[run_tests] GROUP=jdbc finished"

make GROUP="proxy" || true
save_test_reports "proxy"
echo "[run_tests] GROUP=proxy finished"
Expand Down Expand Up @@ -343,6 +335,7 @@ ensure_testplugin_jar() {
}

feature_test(){
local use_fdw="${1:-false}"
# Ensure PXF CLI is available for gpupgrade tests and sanity checks
export PXF_HOME=${PXF_HOME:-/usr/local/pxf}
export PATH="${PXF_HOME}/bin:${PATH}"
Expand All @@ -363,49 +356,18 @@ feature_test(){

configure_pxf_default_hdfs_server

export PROTOCOL=
make GROUP="features" || true
save_test_reports "features"
echo "[run_tests] GROUP=features finished"
}

gpdb_test() {
local use_fdw="$1"
export PROTOCOL=HDFS
export PXF_HOME=${PXF_HOME:-/usr/local/pxf}
export PATH="${PXF_HOME}/bin:${PATH}"
ensure_gpupgrade_helpers
ensure_testplugin_jar

# Make sure core services are alive before preparing configs
health_check_with_retry || true

export PGHOST=127.0.0.1
export PATH="${GPHOME}/bin:${PATH}"
ensure_testuser_pg_hba
# Clean stale state from previous runs so gpdb suite starts fresh
cleanup_hdfs_test_data
hdfs dfs -rm -r -f /tmp/pxf_automation_data >/dev/null 2>&1 || true
cleanup_hive_state
cleanup_hbase_state

# Ensure PXF points to local HDFS/Hive/HBase configs
configure_pxf_default_hdfs_server

local extra_args=""
local extra_args="USE_FDW=false"
local report_name="features"
if [[ "$use_fdw" == "true" ]]; then
extra_args="USE_FDW=true"
else
extra_args="USE_FDW=false"
report_name="features_fdw"
fi
echo "[run_tests] Starting GROUP=gpdb $extra_args"
make GROUP="gpdb" $extra_args || true
if [[ "$use_fdw" == "true" ]]; then
save_test_reports "gpdb_fdw"
else
save_test_reports "gpdb"
fi
echo "[run_tests] GROUP=gpdb $extra_args finished"
# "features" and "gpdb" tags largely overlap; union them so each test
# runs once per USE_FDW mode instead of once per tag
make GROUP="features,gpdb" $extra_args || true
save_test_reports "$report_name"
echo "[run_tests] GROUP=features,gpdb $extra_args finished"
}

bench_prepare_env() {
Expand Down Expand Up @@ -504,7 +466,7 @@ generate_test_summary() {

local group=$(basename "$group_dir")
# Skip if it's not a test group directory
[[ "$group" =~ ^(smoke|hcatalog|hcfs|hdfs|hive|gpdb|sanity|hbase|profile|jdbc|proxy|unused|features|load|performance|fdw|gpdb_fdw)$ ]] || continue
[[ "$group" =~ ^(smoke|hcatalog|hcfs|hdfs|hive|hbase|profile|proxy|unused|features|features_fdw|load|performance|fdw)$ ]] || continue

echo "Processing $group test reports from $group_dir"

Expand Down Expand Up @@ -640,9 +602,6 @@ run_single_group() {
cd "${REPO_ROOT}/fdw"
make test
;;
gpdb_fdw)
gpdb_test "true"
;;
server)
cd "${REPO_ROOT}/server"
./gradlew test
Expand All @@ -663,10 +622,10 @@ run_single_group() {
save_test_reports "hbase"
;;
features)
feature_test
feature_test "false"
;;
gpdb)
gpdb_test "false"
features_fdw)
feature_test "true"
;;
load)
bench_prepare_env
Expand All @@ -682,14 +641,14 @@ run_single_group() {
make GROUP="proxy"
save_test_reports "proxy"
;;
sanity|smoke|hdfs|hcatalog|hcfs|profile|jdbc|unused)
smoke|hdfs|hcatalog|hcfs|profile|unused)
export PROTOCOL=
make GROUP="$group"
save_test_reports "$group"
;;
*)
echo "Unknown test group: $group"
echo "Available groups: cli, external-table, fdw, server, sanity, smoke, hdfs, hcatalog, hcfs, hive, hbase, profile, jdbc, proxy, unused, features, gpdb, gpdb_fdw, load, performance, bench"
echo "Available groups: cli, external-table, fdw, server, smoke, hdfs, hcatalog, hcfs, hive, hbase, profile, proxy, unused, features, features_fdw, load, performance, bench"
exit 1
;;
esac
Expand All @@ -713,8 +672,9 @@ main() {
# Run base tests (includes smoke, hdfs, hcatalog, hcfs, hive, etc.)
base_test

# Run feature tests (includes features, gpdb)
feature_test
# Run feature tests (union of features + gpdb tags, once per USE_FDW mode)
feature_test "false"
feature_test "true"

# Run bench tests (includes load, performance)
bench_test
Expand Down
Loading