Skip to content

Commit b558c61

Browse files
committed
o Changed the test temp db directory naming scheme from System.currentTimeMillis() to a counter
o Removed an extraneous delete of the db dir that happened too soon and broke with the new kernel locking scheme
1 parent d73bb27 commit b558c61

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/test/java/org/neo4j/gis/spatial/Neo4jTestCase.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ protected void setUp() throws Exception {
8282

8383
protected void updateStorePrefix()
8484
{
85-
storePrefix = System.currentTimeMillis();
85+
storePrefix++;
8686
}
8787

8888
/**
8989
* Configurable options for text cases, with or without deleting the previous database, and with
9090
* or without using the BatchInserter for higher creation speeds. Note that tests that need to
9191
* delete nodes or use transactions should not use the BatchInserter.
92-
*
92+
*
9393
* @param deleteDb
9494
* @param useBatchInserter
9595
* @throws Exception
@@ -102,7 +102,7 @@ protected void setUp(boolean deleteDb, boolean useBatchInserter, boolean autoTx)
102102
/**
103103
* For test cases that want to control their own database access, we should
104104
* shutdown the current one.
105-
*
105+
*
106106
* @param deleteDb
107107
*/
108108
protected void shutdownDatabase(boolean deleteDb) {
@@ -126,13 +126,13 @@ protected void shutdownDatabase(boolean deleteDb) {
126126
* Some tests require switching between normal EmbeddedGraphDatabase and BatchInserter, so we
127127
* allow that with this method. We also allow deleting the previous database, if that is desired
128128
* (probably only the first time this is called).
129-
*
129+
*
130130
* @param deleteDb
131131
* @param useBatchInserter
132132
* @throws Exception
133133
*/
134134
protected void reActivateDatabase(boolean deleteDb, boolean useBatchInserter, boolean autoTx) throws Exception {
135-
shutdownDatabase(deleteDb);
135+
shutdownDatabase( deleteDb );
136136
Map<String, String> config = NORMAL_CONFIG;
137137
String largeMode = System.getProperty("spatial.test.large");
138138
if (largeMode != null && largeMode.equalsIgnoreCase("true")) {
@@ -153,7 +153,7 @@ protected void reActivateDatabase(boolean deleteDb, boolean useBatchInserter, bo
153153
@Override
154154
@After
155155
protected void tearDown() throws Exception {
156-
shutdownDatabase(true);
156+
shutdownDatabase( true );
157157
super.tearDown();
158158
}
159159

src/test/java/org/neo4j/gis/spatial/TestSpatial.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
* out neo4j-spatial</dd>
7171
* </dl>
7272
* </p>
73-
*
73+
*
7474
* @author Davide Savazzi
7575
* @author Craig Taverner
7676
*/
@@ -96,7 +96,7 @@ public String toString() {
9696
* testing against real geometries. We have a few hard-coded test geometries we expect to find
9797
* stored in predictable ways in the test database. Currently we only test for bounding box so
9898
* this class only contains that information.
99-
*
99+
*
100100
* @author craig
101101
* @since 1.0.0
102102
*/
@@ -280,7 +280,6 @@ protected void testImport(String layerName) throws Exception {
280280
}
281281
}
282282
System.out.println("Total time for load: " + 1.0 * (System.currentTimeMillis() - start) / 1000.0 + "s");
283-
deleteDatabase( false );
284283
}
285284

286285
private void loadTestShpData(String layerName, int commitInterval) throws ShapefileException, FileNotFoundException,

0 commit comments

Comments
 (0)