Skip to content

Commit

Permalink
Fix flaky build (#288)
Browse files Browse the repository at this point in the history
* Enable unstable integration test case

* Change to java 1.8

* Change to java 1.8

* Revert "Change to java 1.8"

This reverts commit 60f3a37.

* Revert "Change to java 1.8"

This reverts commit a9de7b1.

* Fix spotless check

* Fix spotless check

* Remove Caffeine artifact

* Change version number to 4.0.2

* Remove Caffeine version number
  • Loading branch information
leungkinghin-ct authored May 28, 2021
1 parent 488e5d9 commit bda910c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Example:
##### Download

```bash
docker pull commercetools/commercetools-project-sync:4.0.1
docker pull commercetools/commercetools-project-sync:4.0.2
```
##### Run

Expand All @@ -209,14 +209,14 @@ docker run \
-e TARGET_PROJECT_KEY=xxxx \
-e TARGET_CLIENT_ID=xxxx \
-e TARGET_CLIENT_SECRET=xxxx \
commercetools/commercetools-project-sync:4.0.1 -s all
commercetools/commercetools-project-sync:4.0.2 -s all
```


### Examples
- To run the all sync modules from a source project to a target project
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s all
docker run commercetools/commercetools-project-sync:4.0.2 -s all
```
This will run the following sync modules in the given order:
1. `Type` Sync and `ProductType` Sync and `States` Sync and `TaxCategory` Sync and `CustomObject` Sync in parallel.
Expand All @@ -226,68 +226,68 @@ commercetools/commercetools-project-sync:4.0.1 -s all

- To run the type sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s types
docker run commercetools/commercetools-project-sync:4.0.2 -s types
```

- To run the productType sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s productTypes
docker run commercetools/commercetools-project-sync:4.0.2 -s productTypes
```

- To run the states sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s states
docker run commercetools/commercetools-project-sync:4.0.2 -s states
```
- To run the taxCategory sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s taxCategories
docker run commercetools/commercetools-project-sync:4.0.2 -s taxCategories
```

- To run the category sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s categories
docker run commercetools/commercetools-project-sync:4.0.2 -s categories
```

- To run the product sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s products
docker run commercetools/commercetools-project-sync:4.0.2 -s products
```

- To run the cartDiscount sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s cartDiscounts
docker run commercetools/commercetools-project-sync:4.0.2 -s cartDiscounts
```

- To run the inventoryEntry sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s inventoryEntries
docker run commercetools/commercetools-project-sync:4.0.2 -s inventoryEntries
```

- To run the customObject sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s customObjects
docker run commercetools/commercetools-project-sync:4.0.2 -s customObjects
```

- To run the customer sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s customers
docker run commercetools/commercetools-project-sync:4.0.2 -s customers
```

- To run the shoppingList sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s shoppingLists
docker run commercetools/commercetools-project-sync:4.0.2 -s shoppingLists
```
- To run both products and shoppingList sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s products shoppingLists
docker run commercetools/commercetools-project-sync:4.0.2 -s products shoppingLists
```

- To run type, productType and shoppingList sync
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s types productTypes shoppingLists
docker run commercetools/commercetools-project-sync:4.0.2 -s types productTypes shoppingLists
```

- To run all sync modules using a runner name
```bash
docker run commercetools/commercetools-project-sync:4.0.1 -s all -r myRunnerName
docker run commercetools/commercetools-project-sync:4.0.2 -s all -r myRunnerName
```
6 changes: 1 addition & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ ext {
commercetoolsSyncJava='5.1.1'
apacheCliVersion = '1.4'
jupiterApiVersion = '5.7.2'
caffeineVersion = '3.0.2'
asyncHttpClientVersion = '2.12.3'
logbackVersion = '1.2.3'
logstashLogbackEncoderVersion= '6.6'
}



apply from: "$rootDir/gradle-scripts/spotless.gradle"
apply from: "$rootDir/gradle-scripts/pmd.gradle"
apply from: "$rootDir/gradle-scripts/jacoco.gradle"
Expand Down Expand Up @@ -79,9 +76,8 @@ dependencies {
implementation "ch.qos.logback:logback-classic:${logbackVersion}"
implementation "ch.qos.logback:logback-core:${logbackVersion}"
implementation "net.logstash.logback:logstash-logback-encoder:${logstashLogbackEncoderVersion}"

implementation "com.google.code.findbugs:annotations:${findbugsVersion}"
implementation "com.github.ben-manes.caffeine:caffeine:${caffeineVersion}"

constraints {
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.3") {
because "previous versions are vulnerable to DoS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.concurrent.CompletionStage;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import uk.org.lidalia.slf4jtest.LoggingEvent;
import uk.org.lidalia.slf4jtest.TestLogger;
Expand Down Expand Up @@ -111,7 +110,6 @@ void transform_ShouldReplaceInventoryEntryReferenceIdsWithKeys() {
assertThat(draftsFromPageStage).isCompletedWithValue(expectedResult);
}

@Disabled
@Test
void syncWithError_ShouldCallErrorCallback() {
final TestLogger syncerTestLogger = TestLoggerFactory.getTestLogger(InventoryEntrySyncer.class);
Expand Down

0 comments on commit bda910c

Please sign in to comment.