This directory contains GitHub Actions workflows for continuous integration and automated maintenance.
Runs end-to-end tests with a single ConfigNode and single DataNode setup.
Trigger:
- Push to
mainordev/*branches - Pull requests to
main
What it does:
- Sets up Node.js environment
- Installs dependencies and builds the project
- Starts IoTDB in Docker (1 ConfigNode + 1 DataNode)
- Runs E2E tests against the IoTDB instance
- Cleans up containers and uploads test results
Runs end-to-end tests with 3 ConfigNodes and 3 DataNodes setup for high availability testing.
Trigger:
- Push to
mainordev/*branches - Pull requests to
main
What it does:
- Sets up Node.js environment
- Installs dependencies and builds the project
- Starts IoTDB cluster in Docker (3 ConfigNodes + 3 DataNodes)
- Runs E2E tests against the IoTDB cluster
- Cleans up containers and uploads test results
Automatically checks for updates to Thrift definitions in Apache IoTDB master branch.
Trigger:
- Scheduled: Every Monday at 00:00 UTC
- Manual: Can be triggered via workflow_dispatch
What it does:
- Clones Apache IoTDB master branch
- Compares Thrift definition files with current version
- If changes detected:
- Updates Thrift IDL files
- Regenerates Node.js client code
- Runs build and unit tests
- Creates a pull request with the changes
- If update fails, creates an issue for manual intervention
You can run the same E2E tests locally using Docker Compose:
# Single node (1C1D)
docker compose -f docker-compose-1c1d.yml up --build --abort-on-container-exit
# Multi-node cluster (3C3D)
docker compose -f docker-compose-3c3d.yml up --build --abort-on-container-exitClean up after tests:
docker compose -f docker-compose-1c1d.yml down -v
docker compose -f docker-compose-3c3d.yml down -vTo manually check and update Thrift definitions:
# Clone IoTDB
git clone --depth 1 https://github.com/apache/iotdb.git /tmp/iotdb
# Copy Thrift files
cp /tmp/iotdb/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift thrift/
cp /tmp/iotdb/iotdb-protocol/thrift-commons/src/main/thrift/common.thrift thrift/
# Regenerate client
thrift --gen js:node -out src/thrift/generated thrift/client.thrift
# Build and test
npm run build
npm testThe E2E tests include:
- Session Tests - Basic session operations (query, non-query, insertTablet)
- SessionPool Tests - Connection pooling, concurrent operations
- TableSessionPool Tests - Table model operations
- Large Query Tests - Large datasets requiring multiple fetchResult calls
- Multi-Node Tests - Load distribution, high availability
The large query tests specifically cover:
- Inserting 1000+ records
- Querying with small fetchSize to force multiple fetchResult calls
- Query filtering on large datasets
- Aggregation queries
- Time range queries
- Concurrent large queries
These tests ensure the client correctly handles pagination and multiple result fetches.
For E2E tests, you can configure:
IOTDB_HOST- IoTDB host (default: localhost)IOTDB_PORT- IoTDB port (default: 6667)IOTDB_USER- Username (default: root)IOTDB_PASSWORD- Password (default: root)IOTDB_HOSTS- Comma-separated list of hosts for multi-node tests
The workflows use standard GITHUB_TOKEN for authentication. No additional secrets are required.
For the Thrift update workflow to create pull requests, ensure the repository has:
- Actions enabled
- Pull request creation permissions for workflows
- Check if IoTDB containers started successfully
- Review container logs:
docker compose logs - Ensure ports are not in use (6667, 6668, 6669)
- Verify Docker has sufficient resources
- Check the workflow run logs
- Verify Thrift compiler is available
- Ensure Node.js build succeeds after regeneration
- Review the auto-created issue for details
- Based on apache/iotdb-client-csharp workflows
- Uses official Apache IoTDB Docker images