JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-2691

Update sybase driver to pass simple unit tests with jtds and verify it works with the new dialect keyword

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      ActiverRecord 0.8.2 on OSX 10.5
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      4

      Description

      I have updated the sybase driver to pass all simple unit tests - see results below:

      $ rake test_sybase_jtds
      (in /Users/leigh/src/ruby/jruby-extras/trunk/activerecord-jdbc)
      Loaded suite /java/jruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
      Started
      ...............
      Finished in 1.856 seconds.

      15 tests, 25 assertions, 0 failures, 0 errors

      1. sybase_jtds_simple_test.rb
        0.1 kB
        Leigh Kennedy
      2. sybase_jtds_simple_test.rb
        0.1 kB
        Leigh Kennedy
      3. sybase_jtds.patch
        2 kB
        Leigh Kennedy
      4. sybase_jtds.rb
        0.4 kB
        Leigh Kennedy

        Activity

        Hide
        Leigh Kennedy added a comment -

        Test against Sybase versions 12.5.1 and 15.02. Requires database option "select into/bulk copy" enabled on the database to pass all tests.

        Note this only works with jTds. Jconnect (the Sybase supplied jdbc driver) is not yet working and will require a bit more work.

        Show
        Leigh Kennedy added a comment - Test against Sybase versions 12.5.1 and 15.02. Requires database option "select into/bulk copy" enabled on the database to pass all tests. Note this only works with jTds. Jconnect (the Sybase supplied jdbc driver) is not yet working and will require a bit more work.
        Hide
        Charles Oliver Nutter added a comment -

        Nice, thank you. Hopefully Nick or someone else can get this integrated into ar-jdbc.

        Show
        Charles Oliver Nutter added a comment - Nice, thank you. Hopefully Nick or someone else can get this integrated into ar-jdbc.
        Hide
        Leigh Kennedy added a comment -

        I no longer work with sybase. If you need any further help from me on this, please let me know sooner rather than later, as I may not be able to down the line.

        Thanks,
        Leigh.

        Show
        Leigh Kennedy added a comment - I no longer work with sybase. If you need any further help from me on this, please let me know sooner rather than later, as I may not be able to down the line. Thanks, Leigh.
        Hide
        Thomas E Enebo added a comment -

        Patch applied in commit ca3e595. This was a blind commit since I don't have Sybase installed. In eyeballing the fixes the changes look like they could conceivably fix issues

        Leigh, I know you said you may not be able to test down the road, but are that far down it yet? Can you make sure trunk is still working at least as well as it was before?

        Show
        Thomas E Enebo added a comment - Patch applied in commit ca3e595. This was a blind commit since I don't have Sybase installed. In eyeballing the fixes the changes look like they could conceivably fix issues Leigh, I know you said you may not be able to test down the road, but are that far down it yet? Can you make sure trunk is still working at least as well as it was before?
        Hide
        Leigh Kennedy added a comment -

        Maybe in a month. I don't use Sybase at work anymore and I have a new baby at home, so thats out of the question for now.

        Show
        Leigh Kennedy added a comment - Maybe in a month. I don't use Sybase at work anymore and I have a new baby at home, so thats out of the question for now.
        Hide
        Stuart Blair added a comment -

        Hi.

        I think there might have been a problem in applying the patch. It looks like we're missing test/sybase_jtds_simple_test.rb.

        C:\code\activerecord-jdbc-adapter>jruby -S rake test_sybase_jtds
        (in C:/code/activerecord-jdbc-adapter)
        You really need Hoe installed to be able to package this gem
        C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5: in `load': No such file to load – test/sybase_jtds_simple_test.rb(LoadError)
        from C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5
        from C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5:in `each'
        from C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5
        rake aborted!
        Command failed with status (1): [C:/jruby-1.1.6/bin/../bin/jruby.bat -Ilib;...]

        (See full trace by running task with --trace)

        As an aside, I have access to a Sybase 12.5.3 server and I'd be happy to help out with testing the Sybase JDBC adapter. Much like Leigh, a new baby is in my near future (next 2 weeks) so I'm not so sure of my availablilty after that point.

        Stuart

        Show
        Stuart Blair added a comment - Hi. I think there might have been a problem in applying the patch. It looks like we're missing test/sybase_jtds_simple_test.rb. C:\code\activerecord-jdbc-adapter>jruby -S rake test_sybase_jtds (in C:/code/activerecord-jdbc-adapter) You really need Hoe installed to be able to package this gem C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5: in `load': No such file to load – test/sybase_jtds_simple_test.rb(LoadError) from C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 from C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5:in `each' from C:/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb:5 rake aborted! Command failed with status (1): [C:/jruby-1.1.6/bin/../bin/jruby.bat -Ilib;...] (See full trace by running task with --trace) As an aside, I have access to a Sybase 12.5.3 server and I'd be happy to help out with testing the Sybase JDBC adapter. Much like Leigh, a new baby is in my near future (next 2 weeks) so I'm not so sure of my availablilty after that point. Stuart
        Hide
        Charles Oliver Nutter added a comment -

        Assuming the additional failure report was against ar-jdbc master, I'm reopening this.

        Show
        Charles Oliver Nutter added a comment - Assuming the additional failure report was against ar-jdbc master, I'm reopening this.
        Hide
        Leigh Kennedy added a comment -

        Here it is (its pretty small_ contents is:

        require 'jdbc_common'
        require 'db/sybase_jtds'

        class SybaseJtdsSimpleTest < Test::Unit::TestCase
        include SimpleTestMethods
        end

        Show
        Leigh Kennedy added a comment - Here it is (its pretty small_ contents is: require 'jdbc_common' require 'db/sybase_jtds' class SybaseJtdsSimpleTest < Test::Unit::TestCase include SimpleTestMethods end
        Hide
        Thomas E Enebo added a comment -

        Leigh, Do the tests pass once you add that file?

        Show
        Thomas E Enebo added a comment - Leigh, Do the tests pass once you add that file?
        Hide
        Thomas E Enebo added a comment -

        Added this new file in commit 106545f. Can you run tests again to verify things are running?

        Show
        Thomas E Enebo added a comment - Added this new file in commit 106545f. Can you run tests again to verify things are running?
        Hide
        Leigh Kennedy added a comment -

        I don't have a sybase environment t test againts, but I will give whatever assistance I can to anyone that does.

        Show
        Leigh Kennedy added a comment - I don't have a sybase environment t test againts, but I will give whatever assistance I can to anyone that does.
        Hide
        Thomas E Enebo added a comment -

        Open too long and I think I applied the magic to fix this. If this is in fact still broken we can just open up a new issue.

        Show
        Thomas E Enebo added a comment - Open too long and I think I applied the magic to fix this. If this is in fact still broken we can just open up a new issue.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Leigh Kennedy
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: