Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
e691317e
Commit
e691317e
authored
14 years ago
by
kaloyane
Browse files
Options
Downloads
Patches
Plain Diff
minor: add handling of ".svn" folders to the test
SVN: 20476
parent
ed622079
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/HierarchicalStorageUpdaterTest.java
+18
-6
18 additions, 6 deletions
...isd/etlserver/plugins/HierarchicalStorageUpdaterTest.java
with
18 additions
and
6 deletions
datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/HierarchicalStorageUpdaterTest.java
+
18
−
6
View file @
e691317e
...
...
@@ -17,6 +17,7 @@
package
ch.systemsx.cisd.etlserver.plugins
;
import
java.io.File
;
import
java.io.FileFilter
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -47,6 +48,14 @@ public class HierarchicalStorageUpdaterTest extends AbstractFileSystemTestCase
private
final
static
String
DATASET_TYPE
=
"dataset-type"
;
private
final
static
FileFilter
ignoreSVNFiles
=
new
FileFilter
()
{
public
boolean
accept
(
File
pathname
)
{
return
pathname
.
getName
().
equals
(
".svn"
)
==
false
;
}
};
private
IEncapsulatedOpenBISService
openBISService
;
private
Mockery
context
;
...
...
@@ -80,7 +89,7 @@ public class HierarchicalStorageUpdaterTest extends AbstractFileSystemTestCase
}
@Test
public
void
testDataIsNotDeletedAfterReconfig
()
public
void
testDataIsNotDeletedAfterReconfig
()
throws
Exception
{
updater
().
execute
();
...
...
@@ -94,7 +103,7 @@ public class HierarchicalStorageUpdaterTest extends AbstractFileSystemTestCase
private
void
prepareDirectoryStructures
()
throws
IOException
{
FileUtils
.
copyDirectory
(
STORE_ROOT_TEMPLATE
,
getStoreRoot
());
FileUtils
.
copyDirectory
(
STORE_ROOT_TEMPLATE
,
getStoreRoot
()
,
ignoreSVNFiles
);
getHierarchyRoot
().
mkdirs
();
}
...
...
@@ -108,9 +117,12 @@ public class HierarchicalStorageUpdaterTest extends AbstractFileSystemTestCase
return
new
File
(
workingDirectory
,
"hierarchy-root"
);
}
private
void
assertDataStoreNotDamaged
()
private
void
assertDataStoreNotDamaged
()
throws
Exception
{
long
templateSize
=
FileUtils
.
sizeOfDirectory
(
STORE_ROOT_TEMPLATE
);
File
cleanStorage
=
new
File
(
workingDirectory
,
"clean-storage-nosvn"
);
FileUtils
.
copyDirectory
(
STORE_ROOT_TEMPLATE
,
cleanStorage
,
ignoreSVNFiles
);
long
templateSize
=
FileUtils
.
sizeOfDirectory
(
cleanStorage
);
long
rootSize
=
FileUtils
.
sizeOfDirectory
(
getStoreRoot
());
String
errMessage
=
...
...
@@ -122,12 +134,12 @@ public class HierarchicalStorageUpdaterTest extends AbstractFileSystemTestCase
private
HierarchicalStorageUpdater
updater
()
{
return
createUpdater
(
tru
e
);
return
createUpdater
(
fals
e
);
}
private
HierarchicalStorageUpdater
reconfiguredUpdater
()
{
return
createUpdater
(
fals
e
);
return
createUpdater
(
tru
e
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment