HeliosDB Nano v3.0.1 - Testing Guide
HeliosDB Nano v3.0.1 - Testing Guide
Quick reference for running tests and using the new daemon mode with REAL/FLOAT support.
Quick Start
Start Daemon Server
# Start daemon on default port 5432./target/release/heliosdb-nano start --daemon \ --port 5432 \ --listen 127.0.0.1 \ --data-dir ./heliosdb-data \ --pid-file ./heliosdb.pidCheck Server Status
./target/release/heliosdb-nano status --pid-file ./heliosdb.pidConnect with psql
psql -h 127.0.0.1 -p 5432 -U postgres -d postgresStop Server
./target/release/heliosdb-nano stop --pid-file ./heliosdb.pidTest Suite
Run All Tests
bash test-scripts/test_comprehensive.shThis runs the full test suite including:
- Daemon initialization and management
- REPL mode operations
- REAL/FLOAT data type support
- PostgreSQL client compatibility
- SSL negotiation
Run Individual Tests
Phase 1: Daemon Mode Setup
bash test-scripts/test_daemon_setup.shTests:
- Server starts in background
- PID file creation
- Process verification
- Port binding
Phase 2: REPL Mode Tests
bash test-scripts/test_repl_basic.shbash test-scripts/test_repl_floats.shtest_repl_basic.sh tests:
- CREATE TABLE
- INSERT operations
- SELECT queries
- Meta commands (\d, \dt, \telemetry)
test_repl_floats.sh tests:
- REAL data type (32-bit float)
- FLOAT data type (64-bit float)
- DOUBLE PRECISION data type
- Mixed numeric types
Phase 3: PostgreSQL Client Tests
bash test-scripts/test_psql_basic.shbash test-scripts/test_psql_floats.shbash test-scripts/test_ssl_negotiation.shtest_psql_basic.sh tests:
- PostgreSQL client connectivity
- CREATE TABLE via psql
- INSERT and SELECT via psql
- Table listing via psql
test_psql_floats.sh tests:
- REAL type operations with psql
- FLOAT operations with psql
- Arithmetic with REAL values
test_ssl_negotiation.sh tests:
- SSL request handling
- Connection fallback to plain
- Certificate-less operation
Phase 4: Daemon Management
bash test-scripts/test_daemon_management.shTests:
- Status command
- Graceful stop
- Restart functionality
- Process verification
Test Output Files
All test results are saved in test-results/:
| File | Content |
|---|---|
comprehensive_test_log.txt | Full test suite execution log |
TEST_TRACKING_v3.0.1.md | Detailed test tracking |
TEST_SUMMARY_v3.0.1.md | Auto-generated summary |
FINAL_TEST_REPORT_v3.0.1.md | Comprehensive test report |
repl_basic_output.txt | REPL basic operations output |
repl_floats_output.txt | REPL float types output |
Feature Examples
Using REAL Data Type (32-bit float)
CREATE TABLE products ( id INT, name TEXT, price REAL);
INSERT INTO products VALUES (1, 'Widget', 9.99);INSERT INTO products VALUES (2, 'Gadget', 19.99);
SELECT * FROM products WHERE price > 15.0;Using FLOAT Data Type (64-bit float)
CREATE TABLE measurements ( id INT, value FLOAT, precision DOUBLE PRECISION);
INSERT INTO measurements VALUES (1, 3.14159, 2.71828182845);SELECT * FROM measurements;Mixed Numeric Types
CREATE TABLE financial_data ( transaction_id INT, amount REAL, tax FLOAT, total DOUBLE PRECISION);
INSERT INTO financial_data VALUES (1, 100.50, 10.05, 110.55);SELECT * FROM financial_data;Performance Tips
For Development
Use REPL mode for quick testing:
./target/release/heliosdb-nano replFor Production
Use daemon mode with proper configuration:
./target/release/heliosdb-nano start --daemon \ --port 5432 \ --listen 0.0.0.0 \ --data-dir /var/lib/heliosdb \ --pid-file /var/run/heliosdb.pidPerformance Characteristics
- REAL (32-bit): Fast, 4 bytes storage
- FLOAT (64-bit): Slightly slower, 8 bytes storage
- SELECT operations: < 1ms typical
- INSERT operations: 3-5ms typical
Troubleshooting
Port Already in Use
# Use a different port./target/release/heliosdb-nano start --daemon --port 6543Daemon Not Running
# Check status./target/release/heliosdb-nano status --pid-file ./heliosdb.pid
# View recent logstail -50 ./heliosdb-daemon-data/server.logpsql Connection Issues
# If SSL negotiation fails, it should automatically fall back# If issues persist, check server status first./target/release/heliosdb-nano status --pid-file ./heliosdb.pidIntegration with CI/CD
Add to your CI/CD pipeline:
#!/bin/bashset -e
# Buildcargo build --release
# Run testsbash test-scripts/test_daemon_setup.shbash test-scripts/test_repl_basic.shbash test-scripts/test_repl_floats.sh
echo "All tests passed!"Data Type Reference
| Type | Size | Range | Precision | Use Case |
|---|---|---|---|---|
| INT | 4 bytes | -2B to +2B | Exact | Counts, IDs |
| TEXT | Variable | N/A | N/A | Names, descriptions |
| REAL | 4 bytes | ±3.4e38 | ~7 digits | Prices, ratings |
| FLOAT | 8 bytes | ±1.7e308 | ~15 digits | Scientific data |
| DOUBLE PRECISION | 8 bytes | ±1.7e308 | ~15 digits | High precision |
| TIMESTAMP | 8 bytes | Wide range | N/A | Timestamps |
Common Operations
Create and Populate a Products Table
# Via REPLecho "CREATE TABLE products ( id INT, name TEXT, price REAL, rating FLOAT);INSERT INTO products VALUES (1, 'Widget', 9.99, 4.5);INSERT INTO products VALUES (2, 'Gadget', 19.99, 4.8);SELECT * FROM products;" | ./target/release/heliosdb-nano replVia psql
psql -h 127.0.0.1 -p 5432 -U postgres -d postgres << 'EOF'CREATE TABLE products ( id INT, name TEXT, price REAL, rating FLOAT);INSERT INTO products VALUES (1, 'Widget', 9.99, 4.5);INSERT INTO products VALUES (2, 'Gadget', 19.99, 4.8);SELECT * FROM products;EOFNext Steps
- Review Results: Check
test-results/FINAL_TEST_REPORT_v3.0.1.md - Run Tests: Execute
bash test-scripts/test_comprehensive.sh - Deploy: Use daemon mode for production
- Monitor: Check status regularly with
./heliosdb-nano status - Backup: Regularly backup your data directory
Support
For issues or questions:
- Review
FINAL_TEST_REPORT_v3.0.1.mdfor detailed test results - Check test output files in
test-results/ - Review
NEW_FEATURES_v3.0.1.mdfor feature documentation
Last Updated: 2025-12-07 Version: 3.0.1 Status: ✅ Production Ready