Skip to content

Commit

Permalink
Reorder iteration over session state
Browse files Browse the repository at this point in the history
  • Loading branch information
insom committed Nov 30, 2021
1 parent f83f87c commit 04e8f36
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spec/mysql2/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1081,17 +1081,17 @@ def run_gc
it "returns multiple session track type values when available" do
@flag_client.query("SET @@SESSION.session_track_transaction_info='CHARACTERISTICS'")

res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_TRANSACTION_STATE)
expect(res).to eq(["________"])

res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_TRANSACTION_CHARACTERISTICS)
expect(res).to eq([""])
res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_SYSTEM_VARIABLES)
expect(res).to eq(%w[session_track_transaction_info CHARACTERISTICS])

res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_STATE_CHANGE)
expect(res).to be_nil

res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_SYSTEM_VARIABLES)
expect(res).to eq(%w[session_track_transaction_info CHARACTERISTICS])
res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_TRANSACTION_CHARACTERISTICS)
expect(res).to eq([""])

res = @flag_client.session_track(Mysql2::Client::SESSION_TRACK_TRANSACTION_STATE)
expect(res).to eq(["________"])
end

it "returns empty array if session track type not found" do
Expand Down

0 comments on commit 04e8f36

Please sign in to comment.