public void test_MultipleUpdatesInOneTables() throws SQLException {
  int id=1;
  String field="field3";
  String selectQuery="SELECT * FROM " + DatabaseCreator.TEST_TABLE1 + " WHERE id="+ id;
  Statement statement=conn.createStatement();
  ResultSet result=statement.executeQuery(selectQuery);
  assertTrue("There is no records with id = " + id,result.next());
  result.close();
  for (int i=0; i < numThreads; i++) {
    threadPool.runTask(createTask7(id,field));
  }
  threadPool.join();
  double expectedVal=id + numThreads;
  result=statement.executeQuery(selectQuery);
  assertTrue("There is no records with id = " + id,result.next());
  result.close();
}

public void test_MultipleUpdatesInOneTables ( ) throws SQLException { int id = 1 ; String field = "field3" ; String selectQuery = "SELECT * FROM " + DatabaseCreator . TEST_TABLE1 + " WHERE id=" + id ; Statement statement = conn . createStatement ( ) ; ResultSet result = statement . executeQuery ( selectQuery ) ; assertTrue ( "There is no records with id = " + id , result . next ( ) ) ; result . close ( ) ; for ( int i = 0 ; i < numThreads ; i ++ ) { threadPool . runTask ( createTask7 ( id , field ) ) ; } threadPool . join ( ) ; double expectedVal = id + numThreads ; result = statement . executeQuery ( selectQuery ) ; assertTrue ( "There is no records with id = " + id , result . next ( ) ) ; result . close ( ) ; }
a few threads execute update operation in the same time for one tables in the database . number of threads is defined by numthreads variable
