Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323006

Summary: [DB] Various PostgreSQL test failures
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.dbAssignee: Victor Roldan Betancort <vroldanbet>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: saulius.tvarijonas, schlamp, vroldanbet
Version: 4.2Flags: vroldanbet: review? (stepper)
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 289194, 350137, 404582    
Attachments:
Description Flags
Test failures none

Description Caspar D. CLA 2010-08-18 06:30:18 EDT
AllTestsDBPsql is pretty broken as well -- at least on my platform:

  PostgreSQL 8.4.4
  Linux 2.6.34
  org.postgresql.jdbc3_8.3.603.201006111745.jar

Yes that's an 8.3 driver and an 8.4 server... but I see at least one
test passing, so for now I'm assuming the driver and server don't have
a problem with each other.

As for the tests, of the first 6 in Net4jDBTest, 5 fail and one passes.
On the 7th test, the suite hangs.

The first five failures are:

org.postgresql.util.PSQLException: ERROR: column "testfield0" is of type bit but expression is of type boolean
org.eclipse.net4j.db.DBException: ERROR: relation "testtable" does not exist
org.eclipse.net4j.db.DBException: ERROR: relation "testtable" does not exist
org.eclipse.net4j.db.DBException: ERROR: relation "testtable" does not exist
org.postgresql.util.PSQLException: Bad value for type long : 

Will attach full traces in a minute.
Comment 1 Caspar D. CLA 2010-08-18 06:31:59 EDT
Created attachment 176880 [details]
Test failures
Comment 2 Caspar D. CLA 2010-08-18 06:40:11 EDT
Adding cc: Kai Schlamp
Comment 3 Stefan Winkler CLA 2010-08-18 09:18:38 EDT
see my comment on Bug 322778
Comment 4 Victor Roldan Betancort CLA 2012-03-08 07:33:44 EST
I'm going to use this bugzilla to provide a patch that tackles several issues.
Managed to take AllTestsDBPsql down to 30 errors and 1 failure.
Comment 5 Victor Roldan Betancort CLA 2012-03-08 07:45:34 EST
Regarding the "testtable" issues, I only managed to fix it creating the database manually. Once create, the test-case can be executed. I haven't found a way to create database through JDBC in PSQL... Anyone?
Comment 6 Victor Roldan Betancort CLA 2012-03-08 09:32:20 EST
code is available in branch bugs/323006
Comment 7 Victor Roldan Betancort CLA 2012-03-12 07:50:22 EDT
Updated branch code. Now down to 14 failures
Comment 8 Eike Stepper CLA 2012-06-05 07:28:30 EDT
Moving all open bug reports to 4.1 because the release is very near and it's hghly unlikely that there will be spare time to address 4.0 problems.

Please make sure that your patches can be applied against the master branch and that your problem is not already fixed there!!!
Comment 9 Eike Stepper CLA 2012-08-14 22:50:25 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 10 Eike Stepper CLA 2012-10-31 06:14:44 EDT
(In reply to comment #6)
> code is available in branch bugs/323006

I see no way of merging this branch myself (tried it already) ;-(

If someone else is willing to reintegrate the respective changes, I'd be happy to review/merge them...
Comment 11 Victor Roldan Betancort CLA 2013-05-10 12:25:43 EDT
I managed to merge the changes with master. Reopening.
Comment 12 Victor Roldan Betancort CLA 2013-05-15 06:05:50 EDT
I've updated all these changes I made in 4.1 and that quickly became obsolete, and updated them to current MASTER state.
All the changes are committed under a new branch called bugs/323006b.
commit 0123d149fa1fd1e5c4977946723ff1138628533b
Comment 13 Eike Stepper CLA 2013-05-19 10:48:47 EDT
Hi Vik, please prefix all your commits with "[bug-id]" to make the automatic release notes work. 

The large objects without actual Blob and Clob support in PostgreSQL took me 2 days to tackle correctly ;-(

commit 24770a2a8333d5e18df024f1bbc851430b0e9734
Comment 14 Eike Stepper CLA 2013-05-19 10:49:41 EDT
(In reply to comment #13)
> Hi Vik, please prefix all your commits with "[bug-id]" to make the automatic
> release notes work.

I recommend to use Mylyn for all these things. Ping me on Skype if you need help ;-)
Comment 15 Eike Stepper CLA 2013-05-19 13:08:28 EDT
I made PostgresqlConfig capable of handling multiple databases:
commit b533cfe47685b48e8c43984d04082110e5e648a3
Comment 16 Eike Stepper CLA 2013-05-20 06:21:38 EDT
*** Bug 289194 has been marked as a duplicate of this bug. ***
Comment 17 Eike Stepper CLA 2013-05-21 06:42:13 EDT
All contained bugs are currently resolved.
Comment 18 Eike Stepper CLA 2013-06-27 03:30:15 EDT
Available in R20130613-1157 (4.2)