Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
require_relative 'helpers/tcp_gate_scheduler'
require_relative 'helpers/tcp_gate_switcher'
require_relative 'helpers/tcp_gate_switcher_process'
require 'rbconfig/sizeof'

TEST_DIRECTORY = Pathname.new(ENV['RUBY_PG_TEST_DIR'] || Dir.pwd)
DATA_OBJ_MEMSIZE = ObjectSpace.memsize_of(Object.new)
Expand Down Expand Up @@ -691,6 +692,7 @@ def set_etc_hosts(hostaddr, hostname)
rescue LoadError
config.filter_run_excluding( :bigdecimal )
end
config.filter_run_excluding( :arch64 ) if RbConfig::SIZEOF["void*"] < 8

### Automatically set up and tear down the database
config.before(:suite) do |*args|
Expand Down
2 changes: 1 addition & 1 deletion spec/pg/connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2916,7 +2916,7 @@ def wait_check_socket(conn)
end
end

it "should encode big strings with typecasting without overflow" do
it "should encode big strings with typecasting without overflow", :arch64 do
big_count = 100
step = 42_949_673
big_len = (step - 3) / 2
Expand Down
4 changes: 2 additions & 2 deletions spec/pg/type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ def expect_deprecated_coder_init
expect( v ).to eq( "Héllo\n".encode(Encoding::ISO_8859_1) )
end

it "should encode big strings without crash" do
it "should encode big strings without crash", :arch64 do
skip if RUBY_ENGINE=="truffleruby"
n = 1 << 30
small = "A" * 100
Expand Down Expand Up @@ -1459,7 +1459,7 @@ def expect_deprecated_coder_init
expect( v.b ).to eq( "\x00\x01\x00\x00\x00\x05H\xE9llo".b )
end

it "should encode big strings without crash" do
it "should encode big strings without crash", :arch64 do
skip if RUBY_ENGINE=="truffleruby"
n = 2_147_483_644
wrapped = ((n + 4 + (1 << 31)) % (1 << 32)) - (1 << 31)
Expand Down
Loading