Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed tests
  • Loading branch information
tvaron3 committed Dec 19, 2024
commit f1f922f2298c3166e91b279d1306bd9e4dde1357
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ private[cosmos] class CosmosRowConverterBase(
private def parseTtlExpired(objectNode: ObjectNode): Boolean = {
objectNode.get(MetadataJsonBodyAttributeName) match {
case metadataNode: JsonNode =>
metadataNode.get(TimeToLiveExpiredPropertyName) match {
return metadataNode.get(TimeToLiveExpiredPropertyName) match {
case valueNode: JsonNode =>
Option(valueNode).fold(false)(v => v.asBoolean(false))
case _ => false
Expand All @@ -706,7 +706,7 @@ private[cosmos] class CosmosRowConverterBase(
private def parseId(objectNode: ObjectNode): String = {
val currentNode = getCurrentOrPreviousNode(objectNode)
if (currentNode != null) {
currentNode.get(IdAttributeName) match {
return currentNode.get(IdAttributeName) match {
case valueNode: JsonNode =>
Option(valueNode).fold(null: String)(v => v.asText(null))
case _ => null
Expand All @@ -718,7 +718,7 @@ private[cosmos] class CosmosRowConverterBase(
private def parseTimestamp(objectNode: ObjectNode): Long = {
val currentNode = getCurrentOrPreviousNode(objectNode)
if (currentNode != null) {
currentNode.get(TimestampAttributeName) match {
return currentNode.get(TimestampAttributeName) match {
case valueNode: JsonNode =>
Option(valueNode).fold(-1L)(v => v.asLong(-1))
case _ => -1L
Expand All @@ -730,7 +730,7 @@ private[cosmos] class CosmosRowConverterBase(
private def parseETag(objectNode: ObjectNode): String = {
val currentNode = getCurrentOrPreviousNode(objectNode)
if (currentNode != null) {
currentNode.get(ETagAttributeName) match {
return currentNode.get(ETagAttributeName) match {
case valueNode: JsonNode =>
Option(valueNode).fold(null: String)(v => v.asText(null))
case _ => null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CosmosItemIdEncodingTest(CosmosClientBuilder clientBuilder) {
super(clientBuilder.contentResponseOnWriteEnabled(true));
}

@BeforeClass(groups = {"fast", "emulator"}, timeOut = SETUP_TIMEOUT)
@BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT)
public void before_CosmosItemTest() {
assertThat(this.client).isNull();
CosmosContainerProperties containerProperties = getCollectionDefinitionWithRangeRangeIndex();
Expand Down Expand Up @@ -74,7 +74,7 @@ public void before_CosmosItemTest() {
"any left-overs with weird encoded ids in the shared container.", containerProperties.getId());
}

@AfterClass(groups = {"fast", "emulator"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
@AfterClass(groups = { "emulator" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
public void afterClass() {
assertThat(this.client).isNotNull();
if (this.container != null) {
Expand All @@ -83,7 +83,7 @@ public void afterClass() {
this.client.close();
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void plainVanillaId() {
TestScenario scenario = new TestScenario(
"PlainVanillaId",
Expand All @@ -110,7 +110,7 @@ public void plainVanillaId() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void containerIdWithUnicodeCharacter() {
TestScenario scenario = new TestScenario(
"ContainerIdWithUnicode鱀",
Expand All @@ -137,7 +137,7 @@ public void containerIdWithUnicodeCharacter() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithWhitespaces() {
TestScenario scenario = new TestScenario(
"IdWithWhitespaces",
Expand All @@ -164,7 +164,7 @@ public void idWithWhitespaces() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idStartingWithWhitespace() {
TestScenario scenario = new TestScenario(
"IdStartingWithWhitespace",
Expand All @@ -191,7 +191,7 @@ public void idStartingWithWhitespace() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idStartingWithWhitespaces() {
TestScenario scenario = new TestScenario(
"IdStartingWithWhitespaces",
Expand All @@ -218,7 +218,7 @@ public void idStartingWithWhitespaces() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idEndingWithWhitespace() {
TestScenario scenario = new TestScenario(
"IdEndingWithWhitespace",
Expand All @@ -245,7 +245,7 @@ public void idEndingWithWhitespace() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idEndingWithWhitespaces() {
TestScenario scenario = new TestScenario(
"IdEndingWithWhitespaces",
Expand All @@ -272,7 +272,7 @@ public void idEndingWithWhitespaces() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithUnicodeCharacters() {
TestScenario scenario = new TestScenario(
"IdWithUnicodeCharacters",
Expand All @@ -299,7 +299,7 @@ public void idWithUnicodeCharacters() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithAllowedSpecialCharacters() {
TestScenario scenario = new TestScenario(
"IdWithAllowedSpecialCharacters",
Expand All @@ -326,7 +326,7 @@ public void idWithAllowedSpecialCharacters() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithBase64EncodedIdCharacters() {
String base64EncodedId = "BQE1D3PdG4N4bzU9TKaCIM3qc0TVcZ2/Y3jnsRfwdHC1ombkX3F1dot/SG0/UTq9AbgdX3kOWoP6qL6lJqWeKgV3zwWWPZO/t5X0ehJzv9LGkWld07LID2rhWhGT6huBM6Q=";
String safeBase64EncodedId = base64EncodedId.replace("/", "-");
Expand Down Expand Up @@ -356,7 +356,7 @@ public void idWithBase64EncodedIdCharacters() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idEndingWithPercentEncodedWhitespace() {
TestScenario scenario = new TestScenario(
"IdEndingWithPercentEncodedWhitespace",
Expand All @@ -383,7 +383,7 @@ public void idEndingWithPercentEncodedWhitespace() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithPercentEncodedSpecialChar() {
TestScenario scenario = new TestScenario(
"IdWithPercentEncodedSpecialChar",
Expand All @@ -410,7 +410,7 @@ public void idWithPercentEncodedSpecialChar() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithDisallowedCharQuestionMark() {
TestScenario scenario = new TestScenario(
"IdWithDisallowedCharQuestionMark",
Expand All @@ -437,7 +437,7 @@ public void idWithDisallowedCharQuestionMark() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithDisallowedCharForwardSlash() {
TestScenario scenario = new TestScenario(
"IdWithDisallowedCharForwardSlash",
Expand All @@ -464,7 +464,7 @@ public void idWithDisallowedCharForwardSlash() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithDisallowedCharForwardSlashButIdValidationEnabled() {
TestScenario scenario = new TestScenario(
"IdWithDisallowedCharForwardSlashButIdValidationEnabled",
Expand Down Expand Up @@ -492,7 +492,7 @@ public void idWithDisallowedCharForwardSlashButIdValidationEnabled() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithDisallowedCharBackSlash() {
TestScenario scenario = new TestScenario(
"IdWithDisallowedCharBackSlash",
Expand All @@ -519,7 +519,7 @@ public void idWithDisallowedCharBackSlash() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithDisallowedCharPoundSign() {
TestScenario scenario = new TestScenario(
"IdWithDisallowedCharPoundSign",
Expand All @@ -546,7 +546,7 @@ public void idWithDisallowedCharPoundSign() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithCarriageReturn() {
TestScenario scenario = new TestScenario(
"IdWithCarriageReturn",
Expand All @@ -573,7 +573,7 @@ public void idWithCarriageReturn() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithTab() {
TestScenario scenario = new TestScenario(
"IdWithTab",
Expand All @@ -600,7 +600,7 @@ public void idWithTab() {
this.executeTestCase(scenario);
}

@Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT)
@Test(groups = { "emulator" }, timeOut = TIMEOUT)
public void idWithLineFeed() {
TestScenario scenario = new TestScenario(
"IdWithLineFeed",
Expand Down
Loading