Skip to content
Snippets Groups Projects
Verified Commit bb324025 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

TST: fix unit tests

parent 60755f41
Branches
No related tags found
1 merge request!74Draft: ENH: file system: directory
Pipeline #47502 failed
...@@ -41,9 +41,9 @@ public class MySQLInsertFSODescriptor extends MySQLTransaction implements Insert ...@@ -41,9 +41,9 @@ public class MySQLInsertFSODescriptor extends MySQLTransaction implements Insert
} }
insertFilePropsStmt.setString(6, entity.filePath.toString()); insertFilePropsStmt.setString(6, entity.filePath.toString());
if (entity.fileParentId != null) { if (entity.fileParentId != null) {
insertFilePropsStmt.setInt(7, entity.fileParentId); insertFilePropsStmt.setString(7, entity.fileParentId);
} else { } else {
insertFilePropsStmt.setNull(7, Types.INTEGER); insertFilePropsStmt.setNull(7, Types.VARCHAR);
} }
if (entity.fileType == ObjectType.DIRECTORY) { if (entity.fileType == ObjectType.DIRECTORY) {
insertFilePropsStmt.setString(8, "inode/directory"); insertFilePropsStmt.setString(8, "inode/directory");
......
...@@ -30,11 +30,11 @@ class LiveFSODescriptor extends FSODescriptor { ...@@ -30,11 +30,11 @@ class LiveFSODescriptor extends FSODescriptor {
// resolve here and now // resolve here and now
children = new LinkedList<VirtualFSODescriptorInterface>(); children = new LinkedList<VirtualFSODescriptorInterface>();
try { try {
pstmt.setInt(1, getEntityId().toInteger()); pstmt.setString(1, getEntityId().toString());
try (ResultSet rs = pstmt.executeQuery()) { try (ResultSet rs = pstmt.executeQuery()) {
while (rs.next()) { while (rs.next()) {
final SparseEntity entity = new SparseEntity(); final SparseEntity entity = new SparseEntity();
entity.id = rs.getInt("FileId"); entity.id = rs.getString("FileId");
DatabaseUtils.parseFSODescriptorFields(rs, entity); DatabaseUtils.parseFSODescriptorFields(rs, entity);
children.add(new LiveFSODescriptor(entity, pstmt)); children.add(new LiveFSODescriptor(entity, pstmt));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment