Skip to content

441 bump jvm sdk #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion gradle-scripts/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext{
commercetoolsJvmSdkVersion = '1.46.0'
commercetoolsJvmSdkVersion = '1.47.0'
mockitoJunitJupiterVersion = '3.0.0'
jupiterApiVersion = '5.5.2'
assertjVersion = '3.13.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void sync_withNewProductWithAssets_shouldCreateProduct() {

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

final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();

// Assert results of sync
assertThat(syncStatistics).hasValues(1, 1, 0, 0);
Expand Down Expand Up @@ -216,7 +216,7 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {

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

final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();

// Assert results of sync
assertThat(syncStatistics).hasValues(1, 0, 1, 0);
Expand All @@ -240,9 +240,9 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
RemoveAsset.ofVariantIdWithKey(1, "1", true),
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("newName"), true),
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
null, true),
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
RemoveAsset.ofVariantIdWithKey(1, "1", true),
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("new name"), true),
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
null, true),
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"), assetsCustomType.getId()))
Expand Down Expand Up @@ -316,9 +316,9 @@ void sync_withMatchingProductWithNewVariantWithAssets_shouldUpdateAddAssetsToNew
RemoveAsset.ofVariantIdWithKey(1, "1", true),
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("new name"), true),
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
null, true),
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"), assetsCustomType.getId()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import io.sphere.sdk.products.ProductVariantDraftBuilder;
import io.sphere.sdk.products.attributes.AttributeDraft;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
Expand Down Expand Up @@ -325,7 +324,6 @@ void getProductKeyFromReference_WithoutAProductReference_ShouldReturnEmptyOpt()
assertThat(result).isEmpty();
}

@Disabled("Fails due to bug on https://github.com/FasterXML/jackson-databind/issues/2442")
@Test
void getReferencedProductKeysFromSet_WithOnlyNullRefsInSet_ShouldReturnEmptySet() {
final AttributeDraft productReferenceSetAttribute =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import io.sphere.sdk.types.CustomFieldsDraft;
import io.sphere.sdk.utils.MoneyImpl;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
Expand Down Expand Up @@ -334,7 +333,6 @@ void resolveReferences_WithMixedReferences_ShouldResolveReferenceAttributes() {
.isEqualTo(Customer.referenceTypeId());
}

@Disabled("Fails due to possible bug on https://github.com/FasterXML/jackson-databind/issues/2442")
@Test
void resolveReferences_WithNullReferenceInSetAttribute_ShouldResolveReferences() {
// preparation
Expand Down Expand Up @@ -370,7 +368,7 @@ void resolveReferences_WithNullReferenceInSetAttribute_ShouldResolveReferences()
final ObjectNode resolvedReference = JsonNodeFactory.instance.objectNode();
resolvedReference.put(REFERENCE_TYPE_ID_FIELD, Product.referenceTypeId());
resolvedReference.put(REFERENCE_ID_FIELD, PRODUCT_ID);
assertThat(resolvedSet).containsExactly(resolvedReference);
assertThat(resolvedSet).containsExactlyInAnyOrder(resolvedReference, JsonNodeFactory.instance.nullNode());
}

@Test
Expand Down