-
Notifications
You must be signed in to change notification settings - Fork 565
How to report a bug
Aidan Haran edited this page Jan 13, 2022
·
4 revisions
Bugs should be reported with as much information as possible so please follow the template guidelines a better bug report.
Please use the template below if you can/need to send us a minimal reproducible script. This is very helpful to isolate problems and helps us to identify solutions more easily.
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "tiny_tds"
gem "activerecord", "x.x.x"
gem "activerecord-sqlserver-adapter", "x.x.x"
end
require "active_record"
require "minitest/autorun"
require "logger"
ActiveRecord::Base.establish_connection(
adapter: "sqlserver",
timeout: 5000,
pool: 100,
encoding: "utf8",
database: "test_database",
username: "SA",
password: "StrongPassword!",
host: "localhost",
port: 1433,
)
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do
drop_table :bug_tests rescue nil
create_table :bug_tests, force: true do |t|
t.bigint :external_id
end
end
class BugTest < ActiveRecord::Base
end
class TestBugTest < Minitest::Test
def setup
@bug_test = BugTest.create!(external_id: 2_032_070_100_001)
end
def test_count
assert_equal 1, BugTest.count
end
end
Make the necessary changes to demonstrate the issue. You can execute it by running ruby the_file.rb
in your terminal. If all goes well, you should see your test case failing.
If you do not have SQL Server running locally and want to test you reproducible script, you can use Docker to spawn a new container and do your tests.