Skip to content

Commit bdc51bb

Browse files
#441: Bump JVM SDK
1 parent 7ac7d0e commit bdc51bb

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

gradle-scripts/dependencies.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ext{
2-
commercetoolsJvmSdkVersion = '1.46.0'
2+
commercetoolsJvmSdkVersion = '1.47.0'
33
mockitoJunitJupiterVersion = '3.0.0'
44
jupiterApiVersion = '5.5.2'
55
assertjVersion = '3.13.2'

src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/products/ProductSyncWithAssetsIT.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void sync_withNewProductWithAssets_shouldCreateProduct() {
162162

163163
final List<ProductDraft> productDrafts = replaceProductsReferenceIdsWithKeys(products);
164164

165-
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
165+
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
166166

167167
// Assert results of sync
168168
assertThat(syncStatistics).hasValues(1, 1, 0, 0);
@@ -216,7 +216,7 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
216216

217217
final List<ProductDraft> productDrafts = replaceProductsReferenceIdsWithKeys(products);
218218

219-
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
219+
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
220220

221221
// Assert results of sync
222222
assertThat(syncStatistics).hasValues(1, 0, 1, 0);
@@ -240,9 +240,9 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
240240
RemoveAsset.ofVariantIdWithKey(1, "1", true),
241241
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("newName"), true),
242242
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
243-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
243+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
244244
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
245-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
245+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
246246
null, true),
247247
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
248248
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"),

src/integration-test/java/com/commercetools/sync/integration/externalsource/products/ProductSyncWithAssetsIT.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
250250
RemoveAsset.ofVariantIdWithKey(1, "1", true),
251251
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("new name"), true),
252252
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
253-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
253+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
254254
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
255-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
255+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
256256
null, true),
257257
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
258258
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"), assetsCustomType.getId()))
@@ -316,9 +316,9 @@ void sync_withMatchingProductWithNewVariantWithAssets_shouldUpdateAddAssetsToNew
316316
RemoveAsset.ofVariantIdWithKey(1, "1", true),
317317
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("new name"), true),
318318
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
319-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
319+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
320320
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
321-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
321+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
322322
null, true),
323323
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
324324
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"), assetsCustomType.getId()))

src/test/java/com/commercetools/sync/products/helpers/ProductBatchProcessorTest.java

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import io.sphere.sdk.products.ProductVariantDraftBuilder;
1313
import io.sphere.sdk.products.attributes.AttributeDraft;
1414
import org.junit.jupiter.api.BeforeEach;
15-
import org.junit.jupiter.api.Disabled;
1615
import org.junit.jupiter.api.Test;
1716

1817
import java.util.ArrayList;
@@ -325,7 +324,6 @@ void getProductKeyFromReference_WithoutAProductReference_ShouldReturnEmptyOpt()
325324
assertThat(result).isEmpty();
326325
}
327326

328-
@Disabled("Fails due to bug on https://github.com/FasterXML/jackson-databind/issues/2442")
329327
@Test
330328
void getReferencedProductKeysFromSet_WithOnlyNullRefsInSet_ShouldReturnEmptySet() {
331329
final AttributeDraft productReferenceSetAttribute =

src/test/java/com/commercetools/sync/products/helpers/VariantReferenceResolverTest.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import io.sphere.sdk.types.CustomFieldsDraft;
2525
import io.sphere.sdk.utils.MoneyImpl;
2626
import org.junit.jupiter.api.BeforeEach;
27-
import org.junit.jupiter.api.Disabled;
2827
import org.junit.jupiter.api.Test;
2928

3029
import java.math.BigDecimal;
@@ -334,7 +333,6 @@ void resolveReferences_WithMixedReferences_ShouldResolveReferenceAttributes() {
334333
.isEqualTo(Customer.referenceTypeId());
335334
}
336335

337-
@Disabled("Fails due to possible bug on https://github.com/FasterXML/jackson-databind/issues/2442")
338336
@Test
339337
void resolveReferences_WithNullReferenceInSetAttribute_ShouldResolveReferences() {
340338
// preparation
@@ -370,7 +368,7 @@ void resolveReferences_WithNullReferenceInSetAttribute_ShouldResolveReferences()
370368
final ObjectNode resolvedReference = JsonNodeFactory.instance.objectNode();
371369
resolvedReference.put(REFERENCE_TYPE_ID_FIELD, Product.referenceTypeId());
372370
resolvedReference.put(REFERENCE_ID_FIELD, PRODUCT_ID);
373-
assertThat(resolvedSet).containsExactly(resolvedReference);
371+
assertThat(resolvedSet).containsExactlyInAnyOrder(resolvedReference, JsonNodeFactory.instance.nullNode());
374372
}
375373

376374
@Test

0 commit comments

Comments
 (0)