Skip to content

Commit b431610

Browse files
authored
fix test and migrate pom to Central (#75)
1 parent cd92ff0 commit b431610

File tree

2 files changed

+43
-43
lines changed

2 files changed

+43
-43
lines changed

pom.xml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
43

54
<parent>
65
<groupId>org.sonatype.oss</groupId>
@@ -12,7 +11,7 @@
1211
<packaging>jar</packaging>
1312
<groupId>com.falkordb</groupId>
1413
<artifactId>jfalkordb</artifactId>
15-
<version>0.3.1-SNAPSHOT</version>
14+
<version>0.4.0-SNAPSHOT</version>
1615

1716
<name>JFalkorDB</name>
1817
<description>Official client for falkordb</description>
@@ -50,9 +49,9 @@
5049
<version>3.10.0</version>
5150
</dependency>
5251
<dependency>
53-
<groupId>org.apache.commons</groupId>
54-
<artifactId>commons-text</artifactId>
55-
<version>1.11.0</version>
52+
<groupId>org.apache.commons</groupId>
53+
<artifactId>commons-text</artifactId>
54+
<version>1.12.0</version>
5655
</dependency>
5756
<dependency>
5857
<groupId>junit</groupId>
@@ -66,36 +65,25 @@
6665
<version>2.0.13</version>
6766
<scope>test</scope>
6867
</dependency>
69-
<dependency>
70-
<groupId>org.junit.jupiter</groupId>
71-
<artifactId>junit-jupiter</artifactId>
72-
<version>5.10.2</version>
73-
<scope>test</scope>
74-
</dependency>
68+
<dependency>
69+
<groupId>org.junit.jupiter</groupId>
70+
<artifactId>junit-jupiter</artifactId>
71+
<version>5.11.2</version>
72+
<scope>test</scope>
73+
</dependency>
7574
<dependency>
7675
<groupId>nl.jqno.equalsverifier</groupId>
7776
<artifactId>equalsverifier</artifactId>
7877
<version>3.16.1</version>
7978
<scope>test</scope>
8079
</dependency>
81-
</dependencies>
80+
</dependencies>
8281
<properties>
8382
<maven.compiler.source>8</maven.compiler.source>
8483
<maven.compiler.target>8</maven.compiler.target>
8584
<maven.test.source>8</maven.test.source>
8685
<maven.test.target>8</maven.test.target>
8786
</properties>
88-
89-
<distributionManagement>
90-
<snapshotRepository>
91-
<id>ossrh</id>
92-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
93-
</snapshotRepository>
94-
<repository>
95-
<id>ossrh</id>
96-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
97-
</repository>
98-
</distributionManagement>
9987
<build>
10088
<plugins>
10189
<plugin>
@@ -118,14 +106,14 @@
118106
</executions>
119107
</plugin>
120108
<plugin>
121-
<groupId>org.sonatype.plugins</groupId>
122-
<artifactId>nexus-staging-maven-plugin</artifactId>
123-
<version>1.6.13</version>
109+
<groupId>org.sonatype.central</groupId>
110+
<artifactId>central-publishing-maven-plugin</artifactId>
111+
<version>0.6.0</version>
124112
<extensions>true</extensions>
125113
<configuration>
126-
<serverId>ossrh</serverId>
127-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
128-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
114+
<publishingServerId>central</publishingServerId>
115+
<autoPublish>true</autoPublish>
116+
<waitUntil>published</waitUntil>
129117
</configuration>
130118
</plugin>
131119
</plugins>
@@ -139,7 +127,7 @@
139127
<plugin>
140128
<groupId>org.apache.maven.plugins</groupId>
141129
<artifactId>maven-source-plugin</artifactId>
142-
<version>2.2.1</version>
130+
<version>3.3.1</version>
143131
<executions>
144132
<execution>
145133
<id>attach-sources</id>
@@ -152,7 +140,7 @@
152140
<plugin>
153141
<groupId>org.apache.maven.plugins</groupId>
154142
<artifactId>maven-javadoc-plugin</artifactId>
155-
<version>2.9.1</version>
143+
<version>3.6.3</version>
156144
<executions>
157145
<execution>
158146
<id>attach-javadocs</id>

src/test/java/com/falkordb/GraphAPITest.java

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public void testRecord() {
222222
+ "doubleValue=Property{name='doubleValue', value=3.14}, "
223223
+ "age=Property{name='age', value=32}}}",
224224
expectedNode.toString());
225-
Assert.assertEquals( 4, expectedNode.getNumberOfProperties());
225+
Assert.assertEquals(4, expectedNode.getNumberOfProperties());
226226

227227
Edge expectedEdge = new Edge();
228228
expectedEdge.setId(0);
@@ -238,7 +238,7 @@ public void testRecord() {
238238
+ "place=Property{name='place', value=TLV}, "
239239
+ "doubleValue=Property{name='doubleValue', value=3.14}, "
240240
+ "since=Property{name='since', value=2000}}}", expectedEdge.toString());
241-
Assert.assertEquals( 4, expectedEdge.getNumberOfProperties());
241+
Assert.assertEquals(4, expectedEdge.getNumberOfProperties());
242242

243243
Map<String, Object> params = new HashMap<>();
244244
params.put("name", name);
@@ -799,16 +799,28 @@ public void test64bitnumber() {
799799
}
800800

801801
@Test
802-
public void testVecf32() {
802+
public void testVecf32() {
803803
ResultSet resultSet = client.query("RETURN vecf32([2.1, -0.82, 1.3, 4.5]) AS vector");
804804
Assert.assertEquals(1, resultSet.size());
805805
Record r = resultSet.iterator().next();
806-
List<Float> vector = r.getValue(0);
806+
List<Object> vector = r.getValue(0);
807807
Assert.assertEquals(4, vector.size());
808-
Assert.assertEquals(2.1f, vector.get(0), 0.01);
809-
Assert.assertEquals(-0.82f, vector.get(1), 0.01);
810-
Assert.assertEquals(1.3f, vector.get(2), 0.01);
811-
Assert.assertEquals(4.5f, vector.get(3), 0.01);
808+
Object res = vector.get(0);
809+
810+
// The result can be either Double or Float depending on the server version
811+
if ( res instanceof Double) {
812+
List<Double> v = r.getValue(0);
813+
Assert.assertEquals(2.1, v.get(0), 0.01);
814+
Assert.assertEquals(-0.82, v.get(1), 0.01);
815+
Assert.assertEquals(1.3, v.get(2), 0.01);
816+
Assert.assertEquals(4.5, v.get(3), 0.01);
817+
} else {
818+
List<Float> v = r.getValue(0);
819+
Assert.assertEquals(2.1f, v.get(0), 0.01);
820+
Assert.assertEquals(-0.82f, v.get(1), 0.01);
821+
Assert.assertEquals(1.3f, v.get(2), 0.01);
822+
Assert.assertEquals(4.5f, v.get(3), 0.01);
823+
}
812824
}
813825

814826
@Test
@@ -886,7 +898,7 @@ private void assertTestGeoPoint() {
886898
Assert.assertEquals(Collections.singletonList("restaurant"), record.keys());
887899
Node node = record.getValue(0);
888900
Property<?> property = node.getProperty("location");
889-
Point result = (Point)property.getValue();
901+
Point result = (Point) property.getValue();
890902

891903
Point point = new Point(30.27822306, -97.75134723);
892904
Assert.assertEquals(point, result);
@@ -942,8 +954,8 @@ public void testSimpleReadOnlyWithTimeOut() {
942954
client.query("CREATE (:person{name:'filipe',age:30})");
943955
try {
944956
client.readOnlyQuery(
945-
"WITH 1000000 as n RETURN reduce(f = 1, x IN range(1, n) | f * x) AS result",
946-
1L);
957+
"WITH 1000000 as n RETURN reduce(f = 1, x IN range(1, n) | f * x) AS result",
958+
1L);
947959

948960
fail("Expected Timeout Exception was not thrown.");
949961
} catch (GraphException e) {

0 commit comments

Comments
 (0)