Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
06ec9044
Commit
06ec9044
authored
Dec 12, 2003
by
Dave Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch to indicate why test cases failed from Oliver Jowett
parent
87270299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
.../jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
+22
-22
No files found.
src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
View file @
06ec9044
...
...
@@ -9,7 +9,7 @@ import java.sql.*;
*
* PS: Do you know how difficult it is to type on a train? ;-)
*
* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java,v 1.2
1 2003/12/11 15:50:20
davec Exp $
* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java,v 1.2
2 2003/12/12 18:30:27
davec Exp $
*/
public
class
DatabaseMetaDataTest
extends
TestCase
...
...
@@ -52,28 +52,28 @@ public class DatabaseMetaDataTest extends TestCase
ResultSet
rs
=
dbmd
.
getTables
(
null
,
null
,
"testmetadat%"
,
new
String
[]
{
"TABLE"
});
assertTrue
(
rs
.
next
()
);
String
tableName
=
rs
.
getString
(
"TABLE_NAME"
);
assert
True
(
tableName
.
equals
(
"testmetadata"
)
);
assert
Equals
(
"testmetadata"
,
tableName
);
String
tableType
=
rs
.
getString
(
"TABLE_TYPE"
);
assert
True
(
tableType
.
equals
(
"TABLE"
)
);
assert
Equals
(
"TABLE"
,
tableType
);
//There should only be one row returned
assertTrue
(
"getTables() returned too many rows"
,
rs
.
next
()
==
false
);
rs
.
close
();
rs
=
dbmd
.
getColumns
(
""
,
""
,
"test%"
,
"%"
);
assertTrue
(
rs
.
next
()
);
assert
True
(
rs
.
getString
(
"TABLE_NAME"
).
equals
(
"testmetadata
"
)
);
assert
True
(
rs
.
getString
(
"COLUMN_NAME"
).
equals
(
"id
"
)
);
assert
True
(
rs
.
getInt
(
"DATA_TYPE"
)
==
java
.
sql
.
Types
.
INTEGER
);
assert
Equals
(
"testmetadata"
,
rs
.
getString
(
"TABLE_NAME
"
)
);
assert
Equals
(
"id"
,
rs
.
getString
(
"COLUMN_NAME
"
)
);
assert
Equals
(
java
.
sql
.
Types
.
INTEGER
,
rs
.
getInt
(
"DATA_TYPE"
)
);
assertTrue
(
rs
.
next
()
);
assert
True
(
rs
.
getString
(
"TABLE_NAME"
).
equals
(
"testmetadata
"
)
);
assert
True
(
rs
.
getString
(
"COLUMN_NAME"
).
equals
(
"name
"
)
);
assert
True
(
rs
.
getInt
(
"DATA_TYPE"
)
==
java
.
sql
.
Types
.
VARCHAR
);
assert
Equals
(
"testmetadata"
,
rs
.
getString
(
"TABLE_NAME
"
)
);
assert
Equals
(
"name"
,
rs
.
getString
(
"COLUMN_NAME
"
)
);
assert
Equals
(
java
.
sql
.
Types
.
VARCHAR
,
rs
.
getInt
(
"DATA_TYPE"
)
);
assertTrue
(
rs
.
next
()
);
assert
True
(
rs
.
getString
(
"TABLE_NAME"
).
equals
(
"testmetadata
"
)
);
assert
True
(
rs
.
getString
(
"COLUMN_NAME"
).
equals
(
"updated
"
)
);
assert
True
(
rs
.
getInt
(
"DATA_TYPE"
)
==
java
.
sql
.
Types
.
TIMESTAMP
);
assert
Equals
(
"testmetadata"
,
rs
.
getString
(
"TABLE_NAME
"
)
);
assert
Equals
(
"updated"
,
rs
.
getString
(
"COLUMN_NAME
"
)
);
assert
Equals
(
java
.
sql
.
Types
.
TIMESTAMP
,
rs
.
getInt
(
"DATA_TYPE"
)
);
}
catch
(
SQLException
ex
)
...
...
@@ -102,13 +102,13 @@ public class DatabaseMetaDataTest extends TestCase
{
String
pkTableName
=
rs
.
getString
(
"PKTABLE_NAME"
);
assert
True
(
pkTableName
.
equals
(
"vv"
)
);
assert
Equals
(
"vv"
,
pkTableName
);
String
pkColumnName
=
rs
.
getString
(
"PKCOLUMN_NAME"
);
assertTrue
(
pkColumnName
.
equals
(
"a"
)
||
pkColumnName
.
equals
(
"b"
));
String
fkTableName
=
rs
.
getString
(
"FKTABLE_NAME"
);
assert
True
(
fkTableName
.
equals
(
"ww"
)
);
assert
Equals
(
"ww"
,
fkTableName
);
String
fkColumnName
=
rs
.
getString
(
"FKCOLUMN_NAME"
);
assertTrue
(
fkColumnName
.
equals
(
"m"
)
||
fkColumnName
.
equals
(
"n"
)
)
;
...
...
@@ -121,10 +121,10 @@ public class DatabaseMetaDataTest extends TestCase
}
String
pkName
=
rs
.
getString
(
"PK_NAME"
);
assert
True
(
pkName
.
equals
(
"vv_pkey"
)
);
assert
Equals
(
"vv_pkey"
,
pkName
);
int
keySeq
=
rs
.
getInt
(
"KEY_SEQ"
);
assert
True
(
keySeq
==
j
);
assert
Equals
(
j
,
keySeq
);
}
...
...
@@ -263,10 +263,10 @@ public class DatabaseMetaDataTest extends TestCase
assertTrue
(
pkTableName
.
equals
(
"people"
)
||
pkTableName
.
equals
(
"policy"
)
);
String
pkColumnName
=
rs
.
getString
(
"PKCOLUMN_NAME"
);
assert
True
(
pkColumnName
.
equals
(
"id"
)
);
assert
Equals
(
"id"
,
pkColumnName
);
String
fkTableName
=
rs
.
getString
(
"FKTABLE_NAME"
);
assert
True
(
fkTableName
.
equals
(
"users"
)
);
assert
Equals
(
"users"
,
fkTableName
);
String
fkColumnName
=
rs
.
getString
(
"FKCOLUMN_NAME"
);
assertTrue
(
fkColumnName
.
equals
(
"people_id"
)
||
fkColumnName
.
equals
(
"policy_id"
)
)
;
...
...
@@ -286,11 +286,11 @@ public class DatabaseMetaDataTest extends TestCase
// this is hacky, but it will serve the purpose
assertTrue
(
rs
.
next
()
);
assert
True
(
rs
.
getString
(
"PKTABLE_NAME"
).
equals
(
"people
"
)
);
assert
True
(
rs
.
getString
(
"PKCOLUMN_NAME"
).
equals
(
"id
"
)
);
assert
Equals
(
"people"
,
rs
.
getString
(
"PKTABLE_NAME
"
)
);
assert
Equals
(
"id"
,
rs
.
getString
(
"PKCOLUMN_NAME
"
)
);
assert
True
(
rs
.
getString
(
"FKTABLE_NAME"
).
equals
(
"users
"
)
);
assert
True
(
rs
.
getString
(
"FKCOLUMN_NAME"
).
equals
(
"people_id
"
)
);
assert
Equals
(
"users"
,
rs
.
getString
(
"FKTABLE_NAME
"
)
);
assert
Equals
(
"people_id"
,
rs
.
getString
(
"FKCOLUMN_NAME
"
)
);
assertTrue
(
rs
.
getString
(
"FK_NAME"
).
startsWith
(
"people"
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment