You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test below, same data sent 2 times and it is always updated (number type). Same is for lenum.
For text type working as expected - no update when sent 2 times same data.
`
void test() {
// given
var pid = new AttributeBuilder()
.name("pid")
.value(1)
.build();
var productVariant = ProductVariantDraft.builder()
.key("test_NR1BAG")
.sku("test_NR1BAG")
.attributes(List.of(pid))
.build();
var productDraft = ProductDraft.builder()
.key("test_NR1BAG")
.name(LocalizedStringBuilder.of().values(Map.of("en-GB", "test_NR1BAG")).build())
.slug(LocalizedStringBuilder.of().values(Map.of("en-GB", "test_NR1BAG")).build())
.productType(ProductTypeResourceIdentifierBuilder.of().key("goldenproduct").build())
.build();
productDraft.setMasterVariant(productVariant);
var productSyncOptions = ProductSyncOptionsBuilder.of(api).build();
// when
new ProductSync(productSyncOptions)
.sync(List.of(productDraft)).toCompletableFuture()
.join();
var result = new ProductSync(productSyncOptions)
.sync(List.of(productDraft)).toCompletableFuture()
.join();
// then
assertThat(result.getUpdated().get()).isZero(); // always fails
}
`
The text was updated successfully, but these errors were encountered:
Test below, same data sent 2 times and it is always updated (number type). Same is for lenum.
For text type working as expected - no update when sent 2 times same data.
`
`
The text was updated successfully, but these errors were encountered: