Skip to content

Commit 6f55f6c

Browse files
fix: Fix CI failures - SpotBugs exclusion, integration test tables, remove stale .commitmsg
- Add CNT_ROUGH_CONSTANT_VALUE SpotBugs exclusion for example code (3.14/3.14159265359 are intentional demo values for float params) - Change ResetTest integration tests to use taxi_trips table (available in CI quickstart dataset) instead of tpch.customer (not available) - Remove .commitmsg that was accidentally re-added
1 parent c8fa9a1 commit 6f55f6c

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

.commitmsg

Lines changed: 0 additions & 16 deletions
This file was deleted.

spotbugs-exclude.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
<Bug pattern="DLS_DEAD_LOCAL_STORE"/>
1212
</Match>
1313

14+
<!-- Example code: rough constants like 3.14 are intentional demo values for float params -->
15+
<Match>
16+
<Package name="ai.spice.example"/>
17+
<Bug pattern="CNT_ROUGH_CONSTANT_VALUE"/>
18+
</Match>
19+
1420
<!-- Config: dead store in getUserAgent() -->
1521
<Match>
1622
<Class name="ai.spice.Config"/>

src/test/java/ai/spice/ResetTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,16 +409,17 @@ public void testResetWithCustomConfig() throws Exception {
409409
// ==================== Integration: reset then query (server required) ====================
410410

411411
/**
412-
* If a local Spice runtime with TPC-H data is running, verify that
412+
* If a local Spice runtime is running, verify that
413413
* reset() followed by query() actually returns data.
414+
* Uses taxi_trips which is available in the CI quickstart dataset.
414415
*/
415416
public void testResetThenQueryIntegration() throws Exception {
416417
if (!serverAvailable) return;
417418

418419
try (SpiceClient client = SpiceClient.builder().build()) {
419420
// First query (establishes connection)
420421
try (FlightStream stream1 = client.query(
421-
"SELECT c_custkey FROM tpch.customer LIMIT 1")) {
422+
"SELECT total_amount FROM taxi_trips LIMIT 1")) {
422423
int rows1 = 0;
423424
while (stream1.next()) {
424425
rows1 += stream1.getRoot().getRowCount();
@@ -431,7 +432,7 @@ public void testResetThenQueryIntegration() throws Exception {
431432

432433
// Second query (lazy rebuild)
433434
try (FlightStream stream2 = client.query(
434-
"SELECT c_custkey FROM tpch.customer LIMIT 2")) {
435+
"SELECT total_amount FROM taxi_trips LIMIT 2")) {
435436
int rows2 = 0;
436437
while (stream2.next()) {
437438
rows2 += stream2.getRoot().getRowCount();
@@ -444,15 +445,16 @@ public void testResetThenQueryIntegration() throws Exception {
444445
/**
445446
* If a local Spice runtime is running, verify that
446447
* reset() followed by queryWithParams() actually returns data.
448+
* Uses taxi_trips which is available in the CI quickstart dataset.
447449
*/
448450
public void testResetThenQueryWithParamsIntegration() throws Exception {
449451
if (!serverAvailable) return;
450452

451453
try (SpiceClient client = SpiceClient.builder().build()) {
452454
// First query
453455
try (ArrowReader reader1 = client.queryWithParams(
454-
"SELECT c_custkey FROM tpch.customer WHERE c_custkey > $1 LIMIT 1",
455-
0)) {
456+
"SELECT total_amount FROM taxi_trips WHERE total_amount > $1 LIMIT 1",
457+
0.0)) {
456458
int rows1 = 0;
457459
while (reader1.loadNextBatch()) {
458460
rows1 += reader1.getVectorSchemaRoot().getRowCount();
@@ -465,8 +467,8 @@ public void testResetThenQueryWithParamsIntegration() throws Exception {
465467

466468
// Second query (re-initializes both Flight and ADBC)
467469
try (ArrowReader reader2 = client.queryWithParams(
468-
"SELECT c_custkey FROM tpch.customer WHERE c_custkey > $1 LIMIT 2",
469-
0)) {
470+
"SELECT total_amount FROM taxi_trips WHERE total_amount > $1 LIMIT 2",
471+
0.0)) {
470472
int rows2 = 0;
471473
while (reader2.loadNextBatch()) {
472474
rows2 += reader2.getVectorSchemaRoot().getRowCount();

0 commit comments

Comments
 (0)