test(pgwire): infrastructure to run PQ Golang tests#6298
test(pgwire): infrastructure to run PQ Golang tests#6298bluestreak01 merged 2 commits intoquestdb:masterfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
|
hello @shubhammenroy, thank you for this very useful PR! The only bit I am unsure about is the introduction of the driver concept. I understand you aim to reuse the main loop code, but I am not sure if it's worth it. It's hard enough to grasp mappings of yaml scripts to actual clients. Having another abstraction, albeit a very thin, makes things a bit more complex. For other clients I decided to accept code duplication if it gives me less abstractions. Although the Python runners share some conversion utilities, but the main flow is separated. WDYT? |
Hi @jerrinot, Thanks for the kind words and for reviewing this! Fair point about the extra abstraction. I added the driver interface to handle differences between pgx and lib/pq in arrays, nulls, and affected rows while keeping a single test flow (prepare → steps → teardown). The main reason for this approach was to avoid duplicating the core execution flow and make it easier to add new drivers in the future. For example, if anyone want 's to add pgconn or go-pg, they can simply implement the interface instead of duplicating the entire suite. As per my thoughts, the interface approach fits best here, but I’m happy to adjust toward the Python-style pattern if you prefer. |
|
let's go with what you have. no need to overthink it, this is supposed to be simple. I tried it locally, tests are passing 👌 |
1c39db6 to
7c0a793
Compare
Hi @jerrinot, |
|
@shubhammenroy many thank for your contribution! |
7c0a793 to
adff8e8
Compare
Add the infrastructure to run tests against PQ Golang