@@ -77,9 +77,33 @@ public function testWorkspaceCreate(
7777 true ,
7878 );
7979
80+ // Check queries against warehouse - no exception expected
81+ $ db = WorkspaceBackendFactory::createWorkspaceForSnowflakeDbal ($ workspace );
82+ // -- Pick the warehouse you want to test
83+ $ db ->executeQuery ("USE WAREHOUSE {$ workspace ['connection ' ]['warehouse ' ]}; " );
84+ // -- Ensure it actually spins compute (no result cache)
85+ $ db ->executeQuery ('ALTER SESSION SET USE_CACHED_RESULT = FALSE; ' );
86+ // -- Easiest dummy SELECT that runs on the warehouse
87+ $ db ->executeQuery ('SELECT CURRENT_WAREHOUSE(), CURRENT_TIMESTAMP(), RANDOM(); ' );
88+
8089 $ this ->assertSame ('snowflake ' , $ workspace ['connection ' ]['backend ' ]);
8190 $ this ->assertSame ($ expectedBackendSize , $ workspace ['backendSize ' ]);
8291 $ this ->assertStringEndsWith ($ expectedWarehouseSuffix , $ workspace ['connection ' ]['warehouse ' ]);
92+
93+ $ credentials = $ this ->workspaces ->createCredentials ($ workspace ['id ' ]);
94+
95+ // Check queries against warehouse - no exception expected
96+ $ db2 = WorkspaceBackendFactory::createWorkspaceForSnowflakeDbal ($ credentials );
97+ // -- Pick the warehouse you want to test
98+ $ db2 ->executeQuery ("USE WAREHOUSE {$ credentials ['connection ' ]['warehouse ' ]}; " );
99+ // -- Ensure it actually spins compute (no result cache)
100+ $ db2 ->executeQuery ('ALTER SESSION SET USE_CACHED_RESULT = FALSE; ' );
101+ // -- Easiest dummy SELECT that runs on the warehouse
102+ $ db2 ->executeQuery ('SELECT CURRENT_WAREHOUSE(), CURRENT_TIMESTAMP(), RANDOM(); ' );
103+
104+ $ this ->assertSame ('snowflake ' , $ credentials ['connection ' ]['backend ' ]);
105+ $ this ->assertSame ($ expectedBackendSize , $ credentials ['backendSize ' ]);
106+ $ this ->assertStringEndsWith ($ expectedWarehouseSuffix , $ credentials ['connection ' ]['warehouse ' ]);
83107 }
84108
85109 public function testWorkspaceLoadLinkedDataFromProjectWithDynamicBackends (): void
0 commit comments