@Override
 public void setUp() throws Exception {
   super.setUp();
   TestUtil.createTable(
       con,
       "BugFreezeTable",
       "Col1      INTEGER             NOT NULL,"
           + "Col2      DATE                NOT NULL,"
           + "Col3      DOUBLE PRECISION        NULL,"
           + "Col4      SMALLINT            NOT NULL,"
           + "Col5      NUMERIC (10)            NULL,"
           + "Col6      DATE                    NULL,"
           + "Col7      NUMERIC (10)        NOT NULL,"
           + "Col8      NUMERIC (10)            NULL");
 }
Example #2
0
  public void xtestLocking() throws Exception {
    Connection con = TestUtil.openDB();
    Connection con2 = TestUtil.openDB();

    TestUtil.createTable(con, "test_lock", "name text");
    Statement st = con.createStatement();
    Statement st2 = con2.createStatement();
    con.setAutoCommit(false);
    st.execute("lock table test_lock");
    st2.executeUpdate("insert into test_lock ( name ) values ('hello')");
    con.commit();
    TestUtil.dropTable(con, "test_lock");
    con.close();
    con2.close();
  }
Example #3
0
  protected void setUp() throws Exception {
    // We must change the default TZ before establishing the connection.
    // Arbitrary timezone that doesn't match our test timezones
    TimeZone.setDefault(TimeZone.getTimeZone("GMT+01"));

    connect();
    TestUtil.createTable(
        con,
        "testtimezone",
        "seq int4, tstz timestamp with time zone, ts timestamp without time zone, t time without time zone, tz time with time zone, d date");

    // This is not obvious, but the "gmt-3" timezone is actually 3 hours *ahead* of GMT
    // so will produce +03 timestamptz output
    con.createStatement().executeUpdate("set timezone = 'gmt-3'");

    // System.err.println("++++++ TESTS START (" + getName() + ") ++++++");
  }