Skip to content

Conversation

@FortuneN
Copy link

@FortuneN FortuneN commented Jan 7, 2026

What does this PR do?

This PR adds a new Testcontainers module for QuestDB, a high-performance open-source time-series database.

Implementation includes:

  • QuestDbBuilder - Fluent API with constants for three protocol ports (8812, 9000, 9009)
  • QuestDbContainer - Exposes connection methods for PostgreSQL, HTTP, and InfluxDB Line Protocol
  • QuestDbConfiguration - Standard configuration pattern following existing module architecture
  • PostgreSQL compatibility mode to prevent Npgsql type introspection failures
  • Integration with official net-questdb-client v2.1.0 library
  • Full multi-targeting support (net8.0-10.0, netstandard2.0-2.1)

Why is it important?

QuestDB is a popular time-series database in the InfluxDB/TimescaleDB space that was missing from Testcontainers. This module enables:

  • Integration testing for .NET applications using QuestDB
  • Three protocol access patterns - developers can test SQL queries (PostgreSQL), REST APIs (HTTP), and high-speed ingestion (ILP)
  • Official client support - demonstrates usage of net-questdb-client for production patterns

Related issues

How to test this PR

Prerequisites:

  • Docker Desktop running
  • .NET 8.0 SDK or higher

Test commands:

# Build module
dotnet build src/Testcontainers.QuestDb/Testcontainers.QuestDb.csproj

# Run all tests (6 tests, ~30 seconds)
dotnet test tests/Testcontainers.QuestDb.Tests/Testcontainers.QuestDb.Tests.csproj

# Verify Release build with TreatWarningsAsErrors
dotnet build src/Testcontainers.QuestDb/Testcontainers.QuestDb.csproj --configuration Release -p:SignAssembly=false

# Preview documentation
docker compose up
# Navigate to http://localhost:8000/modules/questdb/

Expected results:

  • ✅ All 6 tests pass
  • ✅ 0 warnings, 0 errors
  • ✅ Documentation renders correctly with code snippets

Follow-ups

  • Monitor CI/CD pipeline execution on ubuntu-24.04 runner
  • Address any code review feedback from maintainers

Summary by CodeRabbit

  • New Features

    • Added QuestDB support in Testcontainers with container builders, runtime APIs, and client connection options; configurable credentials and sensible defaults.
  • Documentation

    • New QuestDB module docs and navigation entry with setup, usage examples, and protocol guidance.
  • Tests

    • New QuestDB test project with integration tests covering SQL, REST, and InfluxDB ingestion.
  • Chores

    • Added QuestDB package version, solution/project entries, CI runner spec, and test Docker image.

✏️ Tip: You can customize this high-level summary in your review settings.

- Implement QuestDbBuilder, QuestDbContainer, and QuestDbConfiguration
- Add comprehensive test suite with 6 tests covering all three protocols
- Support PostgreSQL wire protocol (port 8812) for SQL queries
- Support HTTP REST API (port 9000) for Web Console access
- Support InfluxDB Line Protocol (port 9009) for high-speed ingestion
- Include official net-questdb-client integration test
- Add complete module documentation with usage examples
- Update solution files, package references, and documentation registry
@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 3db45c9
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/695df80335b38b0008780ced
😎 Deploy Preview https://deploy-preview-1618--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Walkthrough

Adds a new QuestDB module: project, builder/configuration/container classes, tests, docs, solution and package registrations, and CI/test assets to enable QuestDB containers and client integration.

Changes

Cohort / File(s) Summary
Solution & Package configuration
Directory.Packages.props, Testcontainers.dic, Testcontainers.sln, Testcontainers.slnx
Added net-questdb-client package version 2.1.0; registered questdb in Testcontainers.dic; added two new projects (Testcontainers.QuestDb and Testcontainers.QuestDb.Tests) and updated solution mappings and build configurations.
Module documentation & site nav
docs/modules/index.md, docs/modules/questdb.md, mkdocs.yml
Added QuestDB module docs (usage, protocols, examples) and registered modules/questdb.md in mkdocs navigation.
QuestDB runtime implementation
src/Testcontainers.QuestDb/Testcontainers.QuestDb.csproj, src/Testcontainers.QuestDb/Usings.cs, src/Testcontainers.QuestDb/QuestDbConfiguration.cs, src/Testcontainers.QuestDb/QuestDbBuilder.cs, src/Testcontainers.QuestDb/QuestDbContainer.cs, src/Testcontainers.QuestDb/.editorconfig
New project with global usings; adds QuestDbConfiguration (username/password, merge semantics), QuestDbBuilder (ports, defaults, env, wait strategy, fluent API), and QuestDbContainer (connection strings, REST/ILP endpoints, port mappings).
QuestDB tests & CI assets
tests/Testcontainers.QuestDb.Tests/Testcontainers.QuestDb.Tests.csproj, tests/Testcontainers.QuestDb.Tests/Usings.cs, tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs, tests/Testcontainers.QuestDb.Tests/Dockerfile, tests/Testcontainers.QuestDb.Tests/.runs-on, tests/Testcontainers.QuestDb.Tests/.editorconfig
New test project and tests exercising lifecycle, SQL (Postgres protocol), REST health, ILP ingestion (single/bulk), and official client ingestion; Dockerfile uses questdb/questdb:9.2.3; CI runner set to ubuntu-24.04.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Test as "Test Suite"
  participant Builder as "QuestDbBuilder"
  participant Docker as "Docker Engine"
  participant Container as "QuestDbContainer"
  participant Client as "net-questdb-client / HTTP / ILP"

  Test->>Builder: configure (image, username, password)
  Builder->>Docker: create & start container (port binds, env)
  Docker->>Container: expose ports 8812, 9000, 9009
  Container->>Docker: wait strategy (HTTP / -> 200 OK on /)
  Test->>Client: connect (Postgres/HTTP/ILP) using Container endpoints
  Client->>Container: ingest/query (SQL / ILP / REST)
  Container->>Test: return results / status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • #1579: Modifies solution files / SLNX entries related to adding new projects (overlaps with solution/project changes here).

Suggested labels

enhancement, module

Suggested reviewers

  • HofmeisterAn

Poem

🐰 A tiny rabbit hops with glee,
Bringing QuestDB to the tree;
Ports and queries, ILP delight,
Containers start and tests take flight,
Logs and rows in moonlit spree.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.42% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add QuestDB module' accurately and concisely summarizes the main change—introducing a new QuestDB module to the Testcontainers library.
Description check ✅ Passed The PR description comprehensively covers all required template sections: clear explanation of what was added (QuestDbBuilder, QuestDbContainer, QuestDbConfiguration), why it matters (enables integration testing with three protocol access patterns), how to test it (detailed commands and expected results), and includes follow-ups for post-merge actions.

✏️ Tip: You can configure your own custom Pre-merge Checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a267195 and 3db45c9.

📒 Files selected for processing (4)
  • src/Testcontainers.QuestDb/.editorconfig
  • src/Testcontainers.QuestDb/QuestDbContainer.cs
  • tests/Testcontainers.QuestDb.Tests/.editorconfig
  • tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs
✅ Files skipped from review due to trivial changes (2)
  • tests/Testcontainers.QuestDb.Tests/.editorconfig
  • src/Testcontainers.QuestDb/.editorconfig
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-17T17:58:43.958Z
Learnt from: diegosasw
Repo: testcontainers/testcontainers-dotnet PR: 1583
File: src/Testcontainers.KurrentDb/Testcontainers.KurrentDb.csproj:7-7
Timestamp: 2025-11-17T17:58:43.958Z
Learning: In the testcontainers-dotnet repository, JetBrains.Annotations should use version 2023.3.0 to maintain consistency with the main Testcontainers csproj, rather than always using the latest available version.

Applied to files:

  • tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs
📚 Learning: 2026-01-02T11:38:24.873Z
Learnt from: HofmeisterAn
Repo: testcontainers/testcontainers-dotnet PR: 1616
File: examples/WeatherForecast/src/WeatherForecast/DatabaseContainer.cs:5-5
Timestamp: 2026-01-02T11:38:24.873Z
Learning: In Testcontainers for .NET 4.10.0 and later, the recommended way to configure PostgreSqlBuilder is to use the parameterized constructor that accepts the image string directly: `new PostgreSqlBuilder("postgres:15.1")` rather than the older pattern of `new PostgreSqlBuilder().WithImage("postgres:15.1")`.

Applied to files:

  • tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs
  • src/Testcontainers.QuestDb/QuestDbContainer.cs
🧬 Code graph analysis (1)
tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs (1)
src/Testcontainers.QuestDb/QuestDbContainer.cs (6)
  • QuestDbContainer (13-17)
  • GetConnectionString (23-33)
  • GetRestApiAddress (39-42)
  • GetInfluxLineProtocolHost (85-88)
  • GetInfluxLineProtocolPort (94-97)
  • GetClientConnectionString (71-79)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: ci (Testcontainers.BigQuery, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
  • GitHub Check: analyze (csharp)
🔇 Additional comments (12)
src/Testcontainers.QuestDb/QuestDbContainer.cs (5)

1-17: LGTM! Solid class structure.

The container class follows the established Testcontainers module pattern with proper configuration storage and base class inheritance.


19-33: LGTM! Proper PostgreSQL compatibility handling.

The connection string correctly includes Server Compatibility Mode=NoTypeLoading to avoid Npgsql type introspection failures with QuestDB, as mentioned in the PR objectives.


35-60: LGTM! Clean HTTP endpoint accessors.

The REST API and web console URL methods provide clear access to the HTTP interface. The GetWebConsoleUrl appropriately returns the same base address since QuestDB's web console is served at the root.


62-79: Excellent! ILP connection string format is now correct.

The method now returns the proper QuestDB ILP connection string format (protocol::addr=host:port;) as specified in the QuestDB client documentation. This addresses the previous review feedback.


81-97: LGTM! Useful granular accessors.

While GetClientConnectionString provides a ready-to-use ILP connection string, these separate host and port methods remain useful for custom scenarios or alternative ILP client configurations.

tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs (7)

1-17: LGTM! Proper test lifecycle management.

The test class correctly implements IAsyncLifetime for container setup and teardown, following the established pattern in the testcontainers-dotnet repository.


19-32: LGTM! Good basic connectivity test.

This test validates the fundamental PostgreSQL wire protocol connectivity using the connection string provided by the container.


34-55: LGTM! Comprehensive SQL functionality test.

The test validates CREATE, INSERT, and SELECT operations with proper async patterns and cancellation token usage. The table definition correctly uses QuestDB's designated timestamp syntax.


57-70: LGTM! Clean REST API verification.

The test confirms the HTTP endpoint is accessible and responding correctly.


72-100: LGTM! Thorough ILP ingestion test.

The test validates raw InfluxDB Line Protocol ingestion over TCP and verifies the data via SQL. The 2-second delay accounts for QuestDB's batch commit lag and is well-documented in the comment.


102-132: LGTM! Solid bulk ingestion test.

The test validates that bulk ILP writes (100 records) are handled correctly, with proper verification of the total count.


134-166: LGTM! Excellent official client integration test.

The test validates the official QuestDB .NET client integration using HTTP transport. It provides good coverage of the GetClientConnectionString(useHttpTransport: true) method and verifies all ingested fields successfully.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @src/Testcontainers.QuestDb/.editorconfig:
- Line 1: The .editorconfig in the QuestDb module currently sets "root = true"
which breaks EditorConfig inheritance; either delete this .editorconfig file so
the module inherits the repository root settings, or edit the file to remove the
"root = true" declaration and instead add only the QuestDb-specific overrides
you need (e.g., charset/indentation/line-ending overrides) so inheritance
remains intact.

In @src/Testcontainers.QuestDb/QuestDbContainer.cs:
- Around line 62-69: GetInfluxLineProtocolEndpoint currently returns
"host::port" which is invalid for QuestDB ILP; update the method to return a
proper ILP connection string like "tcp::addr=HOST:PORT;" (include the protocol
schema, the "addr=" key with host:port using a single ':' and a trailing
semicolon). Use Hostname and
GetMappedPublicPort(QuestDbBuilder.QuestDbInfluxLinePort) to build the addr
value and prepend "tcp::" (or "http::" if you intend HTTP) and append ";" so the
final format is e.g. "tcp::addr=localhost:9009;".
🧹 Nitpick comments (3)
docs/modules/questdb.md (1)

65-67: Add language specifier to fenced code block.

The fenced code block showing the ILP format lacks a language identifier, which is flagged by markdownlint. While the documentation renders correctly without it, specifying a language identifier is a best practice for consistent formatting.

🔎 Proposed fix
 **ILP Format:**
-```
+```text
 measurement,tag1=value1,tag2=value2 field1=value1,field2=value2 timestamp
</details>

</blockquote></details>
<details>
<summary>tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs (2)</summary><blockquote>

`19-31`: **Consider using async pattern for consistency.**

This test uses synchronous `connection.Open()` while other tests in the class use `await connection.OpenAsync()`. While functional, using async patterns throughout would be more consistent.


<details>
<summary>🔎 Suggested async refactor</summary>

```diff
 [Fact]
 [Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))]
-public void ConnectionStateReturnsOpen()
+public async Task ConnectionStateReturnsOpen()
 {
     // Given
-    using var connection = new NpgsqlConnection(_questDbContainer.GetConnectionString());
+    await using var connection = new NpgsqlConnection(_questDbContainer.GetConnectionString());
 
     // When
-    connection.Open();
+    await connection.OpenAsync(TestContext.Current.CancellationToken);
 
     // Then
     Assert.Equal(ConnectionState.Open, connection.State);
 }

86-88: Hardcoded delay may be flaky in CI.

The 2-second delay for ILP commit lag is reasonable but could be flaky under high CI load. Consider adding a retry mechanism or polling the table until data appears, with a timeout.

That said, this pattern appears to be intentional for testing QuestDB's batch commit behavior, so the current approach is acceptable if tests pass reliably.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f776ff9 and b723a31.

📒 Files selected for processing (19)
  • Directory.Packages.props
  • Testcontainers.dic
  • Testcontainers.sln
  • Testcontainers.slnx
  • docs/modules/index.md
  • docs/modules/questdb.md
  • mkdocs.yml
  • src/Testcontainers.QuestDb/.editorconfig
  • src/Testcontainers.QuestDb/QuestDbBuilder.cs
  • src/Testcontainers.QuestDb/QuestDbConfiguration.cs
  • src/Testcontainers.QuestDb/QuestDbContainer.cs
  • src/Testcontainers.QuestDb/Testcontainers.QuestDb.csproj
  • src/Testcontainers.QuestDb/Usings.cs
  • tests/Testcontainers.QuestDb.Tests/.editorconfig
  • tests/Testcontainers.QuestDb.Tests/.runs-on
  • tests/Testcontainers.QuestDb.Tests/Dockerfile
  • tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs
  • tests/Testcontainers.QuestDb.Tests/Testcontainers.QuestDb.Tests.csproj
  • tests/Testcontainers.QuestDb.Tests/Usings.cs
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: HofmeisterAn
Repo: testcontainers/testcontainers-dotnet PR: 1616
File: examples/WeatherForecast/src/WeatherForecast/DatabaseContainer.cs:5-5
Timestamp: 2026-01-02T11:38:17.615Z
Learning: In Testcontainers for .NET 4.10.0 and later, the recommended way to configure PostgreSqlBuilder is to use the parameterized constructor that accepts the image string directly: `new PostgreSqlBuilder("postgres:15.1")` rather than the older pattern of `new PostgreSqlBuilder().WithImage("postgres:15.1")`.
📚 Learning: 2026-01-02T11:38:17.615Z
Learnt from: HofmeisterAn
Repo: testcontainers/testcontainers-dotnet PR: 1616
File: examples/WeatherForecast/src/WeatherForecast/DatabaseContainer.cs:5-5
Timestamp: 2026-01-02T11:38:17.615Z
Learning: In Testcontainers for .NET 4.10.0 and later, the recommended way to configure PostgreSqlBuilder is to use the parameterized constructor that accepts the image string directly: `new PostgreSqlBuilder("postgres:15.1")` rather than the older pattern of `new PostgreSqlBuilder().WithImage("postgres:15.1")`.

Applied to files:

  • tests/Testcontainers.QuestDb.Tests/Usings.cs
  • docs/modules/questdb.md
  • docs/modules/index.md
  • src/Testcontainers.QuestDb/QuestDbBuilder.cs
  • src/Testcontainers.QuestDb/QuestDbContainer.cs
  • tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs
📚 Learning: 2025-11-17T17:58:43.958Z
Learnt from: diegosasw
Repo: testcontainers/testcontainers-dotnet PR: 1583
File: src/Testcontainers.KurrentDb/Testcontainers.KurrentDb.csproj:7-7
Timestamp: 2025-11-17T17:58:43.958Z
Learning: In the testcontainers-dotnet repository, JetBrains.Annotations should use version 2023.3.0 to maintain consistency with the main Testcontainers csproj, rather than always using the latest available version.

Applied to files:

  • docs/modules/index.md
  • src/Testcontainers.QuestDb/Usings.cs
  • tests/Testcontainers.QuestDb.Tests/Testcontainers.QuestDb.Tests.csproj
  • Testcontainers.sln
  • Testcontainers.slnx
  • tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs
  • src/Testcontainers.QuestDb/Testcontainers.QuestDb.csproj
🧬 Code graph analysis (5)
src/Testcontainers.QuestDb/QuestDbConfiguration.cs (1)
src/Testcontainers/Builders/BuildConfiguration.cs (1)
  • BuildConfiguration (13-190)
src/Testcontainers.QuestDb/Usings.cs (1)
src/Testcontainers/Logging.cs (1)
  • Logging (10-302)
src/Testcontainers.QuestDb/QuestDbBuilder.cs (2)
src/Testcontainers.QuestDb/QuestDbConfiguration.cs (6)
  • PublicAPI (4-71)
  • QuestDbConfiguration (12-18)
  • QuestDbConfiguration (24-28)
  • QuestDbConfiguration (34-38)
  • QuestDbConfiguration (44-48)
  • QuestDbConfiguration (55-60)
src/Testcontainers.QuestDb/QuestDbContainer.cs (2)
  • PublicAPI (4-88)
  • QuestDbContainer (13-17)
src/Testcontainers.QuestDb/QuestDbContainer.cs (2)
src/Testcontainers.QuestDb/QuestDbBuilder.cs (10)
  • QuestDbContainer (88-92)
  • QuestDbBuilder (31-34)
  • QuestDbBuilder (46-50)
  • QuestDbBuilder (56-60)
  • QuestDbBuilder (70-74)
  • QuestDbBuilder (81-85)
  • QuestDbBuilder (95-108)
  • QuestDbBuilder (111-114)
  • QuestDbBuilder (117-120)
  • QuestDbBuilder (123-126)
src/Testcontainers.QuestDb/QuestDbConfiguration.cs (5)
  • QuestDbConfiguration (12-18)
  • QuestDbConfiguration (24-28)
  • QuestDbConfiguration (34-38)
  • QuestDbConfiguration (44-48)
  • QuestDbConfiguration (55-60)
tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs (3)
src/Testcontainers.QuestDb/QuestDbBuilder.cs (10)
  • QuestDbContainer (88-92)
  • QuestDbBuilder (31-34)
  • QuestDbBuilder (46-50)
  • QuestDbBuilder (56-60)
  • QuestDbBuilder (70-74)
  • QuestDbBuilder (81-85)
  • QuestDbBuilder (95-108)
  • QuestDbBuilder (111-114)
  • QuestDbBuilder (117-120)
  • QuestDbBuilder (123-126)
src/Testcontainers.QuestDb/QuestDbContainer.cs (6)
  • QuestDbContainer (13-17)
  • GetConnectionString (23-33)
  • GetRestApiAddress (39-42)
  • GetInfluxLineProtocolHost (75-78)
  • GetInfluxLineProtocolPort (84-87)
  • GetHttpApiPort (48-51)
tests/Testcontainers.Commons/TestSession.cs (2)
  • TestSession (10-13)
  • GetImageFromDockerfile (15-27)
🪛 markdownlint-cli2 (0.18.1)
docs/modules/questdb.md

65-65: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.BigQuery, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
  • GitHub Check: analyze (csharp)
🔇 Additional comments (21)
tests/Testcontainers.QuestDb.Tests/.editorconfig (1)

1-1: LGTM! Standard EditorConfig root directive.

This follows the established pattern for EditorConfig files in the repository.

tests/Testcontainers.QuestDb.Tests/.runs-on (1)

1-1: LGTM! Appropriate CI runner selection.

Ubuntu 24.04 is a suitable choice for the QuestDB test suite and aligns with the PR's stated CI/CD monitoring plan.

Testcontainers.dic (1)

28-28: LGTM! Correctly positioned in alphabetical order.

The "questdb" entry is properly sorted and prevents the term from being flagged in spell-checking.

mkdocs.yml (1)

68-68: LGTM! Documentation navigation entry properly ordered.

The QuestDB module documentation is correctly positioned alphabetically in the navigation structure.

tests/Testcontainers.QuestDb.Tests/Usings.cs (1)

1-13: LGTM! Comprehensive global usings for QuestDB testing.

The namespace imports appropriately cover the three protocol access patterns mentioned in the PR:

  • SQL via PostgreSQL compatibility (Npgsql)
  • HTTP REST API (System.Net.Http)
  • ILP high-speed ingestion (QuestDB client)

The inclusion of networking primitives (System.Net.Sockets) supports lower-level connectivity verification.

src/Testcontainers.QuestDb/Usings.cs (1)

1-12: LGTM!

The global using directives are well-organized and appropriate for a Testcontainers module. The namespaces follow the established pattern from other modules in the repository.

docs/modules/index.md (1)

70-70: LGTM!

The QuestDB module entry is correctly formatted, properly positioned alphabetically, and follows the established pattern for module documentation.

tests/Testcontainers.QuestDb.Tests/Dockerfile (1)

1-1: LGTM!

The Dockerfile correctly references the QuestDB image version (9.2.3) that is consistently used throughout the module documentation and implementation.

Testcontainers.slnx (2)

61-61: LGTM!

The QuestDb project is correctly added to the solution in alphabetical order.


132-132: LGTM!

The QuestDb test project is correctly added to the solution in alphabetical order.

src/Testcontainers.QuestDb/Testcontainers.QuestDb.csproj (1)

1-12: LGTM!

The project file follows the established pattern for Testcontainers modules:

  • Multi-targeting across .NET 8/9/10 and .NET Standard 2.0/2.1
  • JetBrains.Annotations version 2023.3.0 matches the main Testcontainers csproj (based on learnings)
  • Proper project reference to the core Testcontainers project
tests/Testcontainers.QuestDb.Tests/Testcontainers.QuestDb.Tests.csproj (1)

1-28: LGTM!

The test project follows the repository's conventions for test projects:

  • Standard test infrastructure dependencies
  • Proper project references for test utilities
  • Dockerfile configuration for custom image testing
Testcontainers.sln (1)

119-120: LGTM!

Solution file correctly integrates the new QuestDB projects:

  • Both source and test projects added with proper GUIDs
  • Build configurations set for Debug and Release
  • Projects correctly nested under src and tests solution folders

Also applies to: 257-258, 485-488, 761-764, 943-944

src/Testcontainers.QuestDb/QuestDbConfiguration.cs (1)

1-71: LGTM!

The configuration class follows the established immutable configuration pattern used by other Testcontainers modules:

  • Constructor overloads for various configuration scenarios
  • Proper use of BuildConfiguration.Combine for merging values
  • Get-only properties for immutability
src/Testcontainers.QuestDb/QuestDbContainer.cs (1)

23-33: LGTM!

The connection string implementation is well-designed:

  • Uses dictionary for clean key-value construction
  • Includes Server Compatibility Mode=NoTypeLoading which is essential for Npgsql to work with QuestDB (avoids type introspection failures)
  • Pulls credentials from configuration and ports from builder constants
tests/Testcontainers.QuestDb.Tests/QuestDbContainerTest.cs (1)

134-168: Good coverage with official QuestDB client.

This test demonstrates the official net-questdb-client usage pattern with HTTP-based ILP ingestion, providing valuable documentation for users of this module.

Directory.Packages.props (1)

83-83: Consider updating to the latest version of net-questdb-client.

Version 2.1.0 is outdated; the latest stable release is 3.2.0 (published December 18, 2025). Confirm whether the specific version was intentional or if updating to 3.2.0 is possible.

src/Testcontainers.QuestDb/QuestDbBuilder.cs (4)

31-50: LGTM! Follows the recommended constructor pattern.

The constructors correctly implement the parameterized approach, allowing users to instantiate with new QuestDbBuilder("questdb/questdb:9.2.3") directly. This aligns with the current Testcontainers.NET best practices. Based on learnings, this is the preferred pattern over the older new Builder().WithImage() approach.


111-126: LGTM! Standard builder pattern implementation.

The Clone and Merge methods correctly implement the immutable configuration pattern required by the ContainerBuilder base class. This ensures configuration changes create new instances rather than modifying existing ones.


95-108: The HTTP endpoint wait strategy is sufficient for all QuestDB services.

The current implementation checks only the HTTP endpoint (port 9000), but test evidence shows this is appropriate. Tests immediately establish PostgreSQL wire protocol connections and ILP connections without additional waits after container startup, confirming that HTTP endpoint readiness correlates with all services being ready. No changes needed.


9-19: No action required. The constants are accurate and match official QuestDB documentation:

  • Ports: 8812 (PostgreSQL), 9000 (HTTP/REST), 9009 (InfluxDB Line Protocol) are all correct
  • Credentials: admin/quest are the official default built-in credentials
  • Database name: qdb is the correct default

- Add IDatabaseContainer interface to QuestDbContainer (fixes CI test failure)
- Remove GetInfluxLineProtocolEndpoint() method with incorrect format
- Delete .editorconfig files that break project-wide formatting inheritance

Users should use GetInfluxLineProtocolHost() and GetInfluxLineProtocolPort() separately for ILP connections.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Testcontainers.QuestDb/QuestDbContainer.cs (1)

23-33: Connection string format is correct.

The implementation properly constructs an Npgsql-compatible connection string with the correct "Server Compatibility Mode=NoTypeLoading" setting to avoid type introspection issues with QuestDB.

Optional: Simplify Dictionary initialization.

The current Dictionary usage is functional but could be slightly more concise with collection initializer syntax.

🔎 Alternative implementation
 public string GetConnectionString()
 {
-    var properties = new Dictionary<string, string>();
-    properties.Add("Host", Hostname);
-    properties.Add("Port", GetMappedPublicPort(QuestDbBuilder.QuestDbPgPort).ToString());
-    properties.Add("Database", QuestDbBuilder.DefaultDatabase);
-    properties.Add("Username", _configuration.Username);
-    properties.Add("Password", _configuration.Password);
-    properties.Add("Server Compatibility Mode", "NoTypeLoading");
+    var properties = new Dictionary<string, string>
+    {
+        ["Host"] = Hostname,
+        ["Port"] = GetMappedPublicPort(QuestDbBuilder.QuestDbPgPort).ToString(),
+        ["Database"] = QuestDbBuilder.DefaultDatabase,
+        ["Username"] = _configuration.Username,
+        ["Password"] = _configuration.Password,
+        ["Server Compatibility Mode"] = "NoTypeLoading"
+    };
     return string.Join(";", properties.Select(property => string.Join("=", property.Key, property.Value)));
 }
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b723a31 and a267195.

📒 Files selected for processing (1)
  • src/Testcontainers.QuestDb/QuestDbContainer.cs
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: HofmeisterAn
Repo: testcontainers/testcontainers-dotnet PR: 1616
File: examples/WeatherForecast/src/WeatherForecast/DatabaseContainer.cs:5-5
Timestamp: 2026-01-02T11:38:24.873Z
Learning: In Testcontainers for .NET 4.10.0 and later, the recommended way to configure PostgreSqlBuilder is to use the parameterized constructor that accepts the image string directly: `new PostgreSqlBuilder("postgres:15.1")` rather than the older pattern of `new PostgreSqlBuilder().WithImage("postgres:15.1")`.
📚 Learning: 2026-01-02T11:38:24.873Z
Learnt from: HofmeisterAn
Repo: testcontainers/testcontainers-dotnet PR: 1616
File: examples/WeatherForecast/src/WeatherForecast/DatabaseContainer.cs:5-5
Timestamp: 2026-01-02T11:38:24.873Z
Learning: In Testcontainers for .NET 4.10.0 and later, the recommended way to configure PostgreSqlBuilder is to use the parameterized constructor that accepts the image string directly: `new PostgreSqlBuilder("postgres:15.1")` rather than the older pattern of `new PostgreSqlBuilder().WithImage("postgres:15.1")`.

Applied to files:

  • src/Testcontainers.QuestDb/QuestDbContainer.cs
🧬 Code graph analysis (1)
src/Testcontainers.QuestDb/QuestDbContainer.cs (2)
src/Testcontainers.QuestDb/QuestDbBuilder.cs (10)
  • QuestDbContainer (88-92)
  • QuestDbBuilder (31-34)
  • QuestDbBuilder (46-50)
  • QuestDbBuilder (56-60)
  • QuestDbBuilder (70-74)
  • QuestDbBuilder (81-85)
  • QuestDbBuilder (95-108)
  • QuestDbBuilder (111-114)
  • QuestDbBuilder (117-120)
  • QuestDbBuilder (123-126)
src/Testcontainers.QuestDb/QuestDbConfiguration.cs (5)
  • QuestDbConfiguration (12-18)
  • QuestDbConfiguration (24-28)
  • QuestDbConfiguration (34-38)
  • QuestDbConfiguration (44-48)
  • QuestDbConfiguration (55-60)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
  • GitHub Check: analyze (csharp)
🔇 Additional comments (5)
src/Testcontainers.QuestDb/QuestDbContainer.cs (5)

1-6: LGTM! Clean class structure.

The class correctly extends DockerContainer, implements IDatabaseContainer, and is appropriately marked with [PublicAPI] for external consumption.


7-17: LGTM! Constructor follows the standard Testcontainers pattern.

The constructor correctly stores the configuration and delegates to the base class.


35-42: LGTM! Proper URI construction.

Correctly uses UriBuilder to construct the REST API base address with the mapped HTTP port.


44-60: LGTM! Port and console URL accessors are correct.

Both methods properly expose the HTTP port and console URL. The delegation from GetWebConsoleUrl to GetRestApiAddress is appropriate since QuestDB's web console is served at the REST API base URL.


62-78: Excellent fix for the ILP endpoint issue!

The separate GetInfluxLineProtocolHost() and GetInfluxLineProtocolPort() methods correctly address the past review concern. By returning host and port separately, ILP clients can construct their own connection strings in the proper format (protocol::addr=host:port;) as required by QuestDB's ILP configuration-string specification.

.editorconfig conformity:
- ALL 60+ modules in the repository have .editorconfig with 'root = true'
- Examples: PostgreSql, MariaDb, Qdrant, MySql, Redis, etc.
- This is the project standard, not an exception
- CodeRabbit's feedback about inheritance was incorrect

ILP endpoint format fix:
- Add GetClientConnectionString(useHttpTransport) method
- Returns proper QuestDB client format: 'protocol::addr=host:port;'
- Supports both TCP (ILP port 9009) and HTTP (port 9000) transports
- Update test to use new simplified method

All 6 tests passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant