mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-152 - udpated the java version to 1.7 and added a random file name to -> File file = new File(TMP + "/chm-myBondPortfolioCHM-" + System.nanoTime());
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>net.openhft</groupId>
|
||||
<artifactId>java-parent-pom</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.1.2</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
@@ -121,24 +121,9 @@
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<compilerArgument>-Xlint:deprecation</compilerArgument>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<testSource>1.8</testSource>
|
||||
<testTarget>1.8</testTarget>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-scm-publish-plugin</artifactId>
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.openhft.chronicle.map.ChronicleMap;
|
||||
import net.openhft.chronicle.map.ChronicleMapBuilder;
|
||||
import net.openhft.lang.io.serialization.impl.NewInstanceObjectFactory;
|
||||
import net.openhft.lang.model.DataValueClasses;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
@@ -32,8 +33,8 @@ import static net.openhft.lang.model.DataValueClasses.directClassFor;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* These code fragments will appear in an article on OpenHFT.
|
||||
* These tests to ensure that the examples compile and behave as expected.
|
||||
* These code fragments will appear in an article on OpenHFT. These tests to ensure that the examples compile
|
||||
* and behave as expected.
|
||||
*/
|
||||
public class OpenJDKAndHashMapExamplesTest {
|
||||
private static final SimpleDateFormat YYYYMMDD = new SimpleDateFormat("yyyyMMdd");
|
||||
@@ -50,16 +51,19 @@ public class OpenJDKAndHashMapExamplesTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void bondExample() throws IOException, InterruptedException {
|
||||
|
||||
Class<BondVOInterface> bondVODirectClass = directClassFor(BondVOInterface.class);
|
||||
NewInstanceObjectFactory<BondVOInterface> bondVODirectObjectFactory =
|
||||
new NewInstanceObjectFactory<BondVOInterface>(bondVODirectClass);
|
||||
File file = new File(TMP + "/chm-myBondPortfolioCHM-" + System.nanoTime());
|
||||
file.deleteOnExit();
|
||||
ChronicleMap<String, BondVOInterface> chm = ChronicleMapBuilder
|
||||
.of(String.class, bondVODirectClass)
|
||||
.valueFactory(bondVODirectObjectFactory)
|
||||
.entrySize(512)
|
||||
.create(new File(TMP + "/chm-myBondPortfolioCHM"));
|
||||
.create(file);
|
||||
|
||||
|
||||
BondVOInterface bondVO = DataValueClasses.newDirectReference(BondVOInterface.class);
|
||||
@@ -148,7 +152,7 @@ public class OpenJDKAndHashMapExamplesTest {
|
||||
// cleanup.
|
||||
chm.close();
|
||||
chmB.close();
|
||||
new File(TMP + "/chm-myBondPortfolioCHM").delete();
|
||||
file.delete();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user