DEV Community

Kamlesh Kumar
Kamlesh Kumar

Posted on

Running Regression Test for AGE-AGEHA (AGE High Availability) and in Pgpool-II version 4.4.2.

Introduction

Apache AGE has brought about an innovative feature to the table - Pgpool-II, which is specially designed to boost the speed and provide high availability for Apache AGE queries. This feature is succinctly named AGEHA, an abbreviation for AGE High Availability. One of the key aspects of maintaining the robustness and reliability of AGEHA is regression testing. This blog post will guide you through the process of running regression tests in the AGEHA or Pgpool-II (version 4.4.2), along with the prerequisites required.

Prerequisites

Before diving into the regression testing process, let's review the prerequisites and how to install them on Ubuntu.

  1. PostgreSQL: Pgpool-II requires PostgreSQL for operation.
sudo apt update
sudo apt install postgresql postgresql-contrib

Enter fullscreen mode Exit fullscreen mode
  1. Perl: Pgpool-II uses Perl for running its regression tests.
sudo apt install perl
Enter fullscreen mode Exit fullscreen mode
  1. Git: Git is required to clone the source code.
sudo apt install git
Enter fullscreen mode Exit fullscreen mode

Cloning and Installing AGEHA/Pgpool-II

With the prerequisites in place, we can now clone and install AGEHA/Pgpool-II. Use the following commands:

git clone https://github.com/apache/age -b AGEHA 
cd age
Enter fullscreen mode Exit fullscreen mode

Compile and install Pgpool-II with:

./configure
make
sudo make install
Enter fullscreen mode Exit fullscreen mode

Running Regression Test in Pgpool-II

Having installed AGEHA/Pgpool-II, we can now proceed to the regression test. Regression testing checks the system's behavior and helps identify potential bugs or inconsistencies. Here's how you can perform the regression test in Pgpool-II:

  1. Navigate to the src/test/regression directory in the cloned repository.
cd src/test/regression
Enter fullscreen mode Exit fullscreen mode
  1. Execute the pgpool_setup script, which creates a fresh test environment.
./pgpool_setup
Enter fullscreen mode Exit fullscreen mode
  1. Run the regression tests with make check. This command runs a suite of regression tests to ensure the system behaves as expected after new changes or updates. "make check" command is designed to run all suite of regression tests.
make check
Enter fullscreen mode Exit fullscreen mode

Running Regression Test for Cypher Queries individualy.

In addition to the general regression tests, AGEHA also supports regression tests specifically for Cypher queries. To execute these tests:

Navigate to the 01.Cypher_load_balance directory.

01.

cd tests/Cypher_load_balance 
Enter fullscreen mode Exit fullscreen mode

Run the test.sh script.

./test.sh
Enter fullscreen mode Exit fullscreen mode

This script will execute the regression test specifically for Cypher queries.

Conclusion

Regression testing plays a vital role in ensuring that the system behaves as expected, and newly introduced changes do not disrupt the existing functionality. In the context of AGEHA/Pgpool-II for Apache AGE, regression testing contributes significantly to maintaining its high-speed and high-availability features. We hope this guide has provided you with a clear understanding of how to run regression tests in (AGEHA)/Pgpool-II version 4.4.2 . Happy testing!

Further references:
Apache-age AGEHA(Pgpool-II) repo: https://github.com/apache/age/tree/AGEHA
Apache-age-repo: https://github.com/apache/age/
Apache-age documentation: https://age.apache.org/age-manual/master/intro/overview.html

Top comments (0)