Skip to content

Commit 956cc17

Browse files
yahondaclaude
andcommitted
Fix Named Schema after(:all) to fully release plsql.connection
The Named Schema describe ended its after(:all) with plsql.connection.logoff, which closes the underlying connection but leaves plsql.connection pointing at the now-closed wrapper. Any later example that attempted plsql.logoff if plsql.connection (for example the after(:each) in "Connection with connect!") then followed the stale reference into rollback on a dead OCI8 handle and raised "OCI8 was already closed". Surfaced under random order when "Named Schema" ran before "Connection with connect!" — the "should not connect with wrong port number" example never replaced the stale connection (its connect! is meant to fail), so its after(:each) was the one that hit the dead handle. Use plsql.logoff so the schema's setter clears @connection to nil. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cf51357 commit 956cc17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/plsql/schema_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
end
121121

122122
after(:all) do
123-
plsql.connection.logoff
123+
plsql.logoff
124124
end
125125

126126
it "should find existing schema" do

0 commit comments

Comments
 (0)