skytin1004 commented on code in PR #7767:
URL: https://github.com/apache/iceberg/pull/7767#discussion_r1219413775
##########
core/src/test/java/org/apache/iceberg/io/TestByteBufferInputStreams.java:
##########
@@ -506,7 +562,8 @@ public void testMarkDoubleReset() throws Exception {
ByteBufferInputStream stream = newStream();
stream.mark(5);
- Assert.assertEquals("Should read 5 bytes", 5, stream.read(new byte[5]));
+
Review Comment:
I deleted the unnecessary newline.
##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -168,70 +166,71 @@ protected boolean supportsNamesWithSlashes() {
public void testCreateNamespace() {
C catalog = catalog();
- Assert.assertFalse("Namespace should not exist",
catalog.namespaceExists(NS));
+ Assertions.assertThat(catalog.namespaceExists(NS)).as("Namespace should
not exist").isFalse();
catalog.createNamespace(NS);
- Assert.assertTrue(
- "Catalog should have the created namespace",
catalog.listNamespaces().contains(NS));
- Assert.assertTrue("Namespace should exist", catalog.namespaceExists(NS));
+ Assertions.assertThat(catalog.listNamespaces())
+ .as("Catalog should have the created namespace")
+ .contains(NS);
+ Assertions.assertThat(catalog.namespaceExists(NS)).as("Namespace should
exist").isTrue();
}
@Test
public void testCreateExistingNamespace() {
C catalog = catalog();
- Assert.assertFalse("Namespace should not exist",
catalog.namespaceExists(NS));
+ Assertions.assertThat(catalog.namespaceExists(NS)).as("Namespace should
not exist").isFalse();
catalog.createNamespace(NS);
- Assert.assertTrue("Namespace should exist", catalog.namespaceExists(NS));
+ Assertions.assertThat(catalog.namespaceExists(NS)).as("Namespace should
exist").isTrue();
Assertions.assertThatThrownBy(() -> catalog.createNamespace(NS))
.isInstanceOf(AlreadyExistsException.class)
.hasMessageContaining("Namespace already exists");
- Assert.assertTrue("Namespace should still exist",
catalog.namespaceExists(NS));
+ Assertions.assertThat(catalog.namespaceExists(NS)).as("Namespace should
still exist").isTrue();
}
@Test
public void testCreateNamespaceWithProperties() {
- Assume.assumeTrue(supportsNamespaceProperties());
+ Assumptions.assumeTrue(supportsNamespaceProperties());
C catalog = catalog();
- Assert.assertFalse("Namespace should not exist",
catalog.namespaceExists(NS));
+ Assertions.assertThat(catalog.namespaceExists(NS)).as("Namespace should
not exist").isFalse();
Map<String, String> createProps = ImmutableMap.of("prop", "val");
catalog.createNamespace(NS, createProps);
- Assert.assertTrue("Namespace should exist", catalog.namespaceExists(NS));
+
Review Comment:
I deleted the unnecessary newline.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]