Skip to content

How to report a bug

Wanderson Policarpo edited this page Apr 29, 2020 · 4 revisions

Bugs should be reported with as much information as possible so please follow the template guidelines a better bug report.

Minimal reproducible script

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

Run SQL Server

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.

See How to run SQL Server in a Docker container.

Clone this wiki locally