Sha256: 1fb332c22029d4f78d2c772fc6e28ec77ee534b4fa8c0b2f32e9893b4a2f2a09

Contents?: true

Size: 570 Bytes

Versions: 2

Compression:

Stored size: 570 Bytes

Contents

require 'cases/helper'

module ActiveRecord::ConnectionAdapters
  class SQLiteAdapter
    class StatementPoolTest < ActiveRecord::TestCase
      def test_cache_is_per_pid
        return skip('must support fork') unless Process.respond_to?(:fork)

        cache = StatementPool.new nil, 10
        cache['foo'] = 'bar'
        assert_equal 'bar', cache['foo']

        pid = fork {
          lookup = cache['foo'];
          exit!(!lookup)
        }

        Process.waitpid pid
        assert $?.success?, 'process should exit successfully'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-nuodb-adapter-2.0.3 test/cases/adapters/sqlite3/statement_pool_test.rb
activerecord-nuodb-adapter-2.0 test/cases/adapters/sqlite3/statement_pool_test.rb