Skip to content

Commit 937f95c

Browse files
authored
Merge pull request #451 from weaviate/v6-update-dependencies
v6: update dependencies
2 parents e5b9516 + d93beb7 commit 937f95c

2 files changed

Lines changed: 22 additions & 38 deletions

File tree

pom.xml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@
5858
<lang3.version>3.18.0</lang3.version>
5959
<junit.version>5.13.4</junit.version>
6060
<testcontainers.version>1.21.3</testcontainers.version>
61-
<assertj-core.version>3.27.3</assertj-core.version>
61+
<assertj-core.version>3.27.4</assertj-core.version>
6262
<jparams.version>1.0.4</jparams.version>
63-
<mockito.version>5.18.0</mockito.version>
63+
<mockito.version>5.19.0</mockito.version>
6464
<slf4j.version>2.0.17</slf4j.version>
6565
<logback.version>1.5.18</logback.version>
6666
<mock-server.version>5.14.0</mock-server.version>
6767
<jackson.version>2.19.2</jackson.version>
68-
<oauth2-oidc-sdk.version>11.26.1</oauth2-oidc-sdk.version>
68+
<oauth2-oidc-sdk.version>11.27.1</oauth2-oidc-sdk.version>
6969
<mock-server.version>5.15.0</mock-server.version>
70-
<protobuf.java.version>4.31.1</protobuf.java.version>
71-
<protobuf.java-util.version>4.31.1</protobuf.java-util.version>
72-
<grpc-netty-shaded.version>1.73.0</grpc-netty-shaded.version>
73-
<grpc-protobuf.version>1.73.0</grpc-protobuf.version>
74-
<grpc-stub.version>1.73.0</grpc-stub.version>
70+
<protobuf.java.version>4.32.0</protobuf.java.version>
71+
<protobuf.java-util.version>4.32.0</protobuf.java-util.version>
72+
<grpc-netty-shaded.version>1.75.0</grpc-netty-shaded.version>
73+
<grpc-protobuf.version>1.75.0</grpc-protobuf.version>
74+
<grpc-stub.version>1.75.0</grpc-stub.version>
7575
<annotations-api.version>6.0.53</annotations-api.version>
7676
</properties>
7777

@@ -132,12 +132,6 @@
132132
<artifactId>oauth2-oidc-sdk</artifactId>
133133
<version>${oauth2-oidc-sdk.version}</version>
134134
</dependency>
135-
<dependency>
136-
<groupId>org.junit.jupiter</groupId>
137-
<artifactId>junit-jupiter-api</artifactId>
138-
<version>${junit.version}</version>
139-
<scope>test</scope>
140-
</dependency>
141135
<dependency>
142136
<groupId>org.testcontainers</groupId>
143137
<artifactId>weaviate</artifactId>
@@ -169,21 +163,14 @@
169163
<scope>test</scope>
170164
</dependency>
171165
<dependency>
172-
<groupId>org.slf4j</groupId>
173-
<artifactId>slf4j-api</artifactId>
174-
<version>${slf4j.version}</version>
175-
<scope>test</scope>
176-
</dependency>
177-
<dependency>
178-
<groupId>ch.qos.logback</groupId>
179-
<artifactId>logback-classic</artifactId>
180-
<version>${logback.version}</version>
181-
<scope>test</scope>
166+
<groupId>org.slf4j</groupId>
167+
<artifactId>slf4j-nop</artifactId>
168+
<version>${slf4j.version}</version>
169+
<scope>test</scope>
182170
</dependency>
183171
<dependency>
184172
<groupId>org.mock-server</groupId>
185-
<!-- TODO: check if we can reduce JAR size by using mockserver-netty-no-dependencies -->
186-
<artifactId>mockserver-netty</artifactId>
173+
<artifactId>mockserver-netty-no-dependencies</artifactId>
187174
<version>${mock-server.version}</version>
188175
<scope>test</scope>
189176
</dependency>

src/test/java/io/weaviate/client6/v1/internal/grpc/ByteStringUtilTest.java

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package io.weaviate.client6.v1.internal.grpc;
22

3-
import static org.junit.Assert.assertArrayEquals;
4-
import static org.junit.jupiter.api.Assertions.assertEquals;
5-
63
import org.assertj.core.api.Assertions;
74
import org.junit.Test;
85

@@ -21,68 +18,68 @@ public void test_encodeVector_1d() {
2118
float[] vector = { 1f, 2f, 3f };
2219
byte[] want = { 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64 };
2320
byte[] got = ByteStringUtil.encodeVectorSingle(vector).toByteArray();
24-
assertArrayEquals(want, got);
21+
Assertions.assertThat(got).isEqualTo(want);
2522
}
2623

2724
@Test
2825
public void test_decodeVector_1d() {
2926
byte[] bytes = { 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64 };
3027
float[] want = { 1f, 2f, 3f };
3128
float[] got = ByteStringUtil.decodeVectorSingle(ByteString.copyFrom(bytes));
32-
assertArrayEquals(want, got, 0);
29+
Assertions.assertThat(got).isEqualTo(want);
3330
}
3431

3532
@Test
3633
public void test_encodeVector_2d() {
3734
float[][] vector = { { 1f, 2f, 3f }, { 4f, 5f, 6f } };
3835
byte[] want = { 3, 0, 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, -128, 64, 0, 0, -96, 64, 0, 0, -64, 64 };
3936
byte[] got = ByteStringUtil.encodeVectorMulti(vector).toByteArray();
40-
assertArrayEquals(want, got);
37+
Assertions.assertThat(got).isEqualTo(want);
4138
}
4239

4340
@Test
4441
public void test_decodeVector_2d() {
4542
byte[] bytes = { 3, 0, 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, -128, 64, 0, 0, -96, 64, 0, 0, -64, 64 };
4643
float[][] want = { { 1f, 2f, 3f }, { 4f, 5f, 6f } };
4744
float[][] got = ByteStringUtil.decodeVectorMulti(ByteString.copyFrom(bytes));
48-
assertArrayEquals(want, got);
45+
Assertions.assertThat(got).isEqualTo(want);
4946
}
5047

5148
@Test
5249
public void test_decodeUuid() {
5350
byte[] bytes = { 38, 19, -74, 24, -114, -19, 73, 43, -112, -60, 47, 96, 83, -89, -35, -23 };
5451
String want = "2613b618-8eed-492b-90c4-2f6053a7dde9";
5552
String got = ByteStringUtil.decodeUuid(ByteString.copyFrom(bytes)).toString();
56-
assertEquals(want, got);
53+
Assertions.assertThat(got).isEqualTo(want);
5754
}
5855

5956
@Test
6057
public void test_decodeVector_1d_empty() {
6158
byte[] bytes = new byte[0];
6259
float[] got = ByteStringUtil.decodeVectorSingle(ByteString.copyFrom(bytes));
63-
assertEquals(0, got.length);
60+
Assertions.assertThat(got).isEmpty();
6461
}
6562

6663
@Test
6764
public void test_decodeVector_2d_empty() {
6865
byte[] bytes = new byte[0];
6966
float[][] got = ByteStringUtil.decodeVectorMulti(ByteString.copyFrom(bytes));
70-
assertEquals(0, got.length);
67+
Assertions.assertThat(got).isEmpty();
7168
}
7269

7370
@Test
7471
public void test_decodeVector_2d_dim_zero() {
7572
byte[] bytes = { 0, 0 };
7673
float[][] got = ByteStringUtil.decodeVectorMulti(ByteString.copyFrom(bytes));
77-
assertEquals(0, got.length);
74+
Assertions.assertThat(got).isEmpty();
7875
}
7976

8077
@Test
8178
public void test_decodeIntValues() {
8279
byte[] bytes = { 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 };
8380
long[] want = { 1, 2, 3 };
8481
long[] got = ByteStringUtil.decodeIntValues(ByteString.copyFrom(bytes));
85-
assertArrayEquals(want, got);
82+
Assertions.assertThat(got).isEqualTo(want);
8683
}
8784

8885
@Test

0 commit comments

Comments
 (0)