Skip to content

Commit

Permalink
Hotfix the NPE in ProductSync Benchmark Test for SDK-v2 (#874)
Browse files Browse the repository at this point in the history
* Examine the build process

* Examine ProductSync benchmark test

* Examine ProductSync benchmarks test for SDK-v2

* Disable saving benchmark result for debugging purpose

* Fix the NPE in ProductSync benchmark test

* Remove System.out.println

* Update version number for hotfix

* Revert the version number change

* Fix release note

Co-authored-by: King-Hin Leung <>
  • Loading branch information
leungkinghin-ct authored Dec 7, 2022
1 parent 42ea44c commit db9718a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/9.1.0...9.2.0) |
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/9.2.0/) |
[Jar](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.2.0/jar)
- 🐞 **Enhancement** (1)
- **Enhancements** (2)
- Display Github tag instead of Github commit hash in Benchmarks chart [#867](https://github.com/commercetools/commercetools-sync-java/pull/867)
- Run Bechmarks test in every commit [#868](https://github.com/commercetools/commercetools-sync-java/pull/868)

To help developers to review the performance change before creating new release, benchmarks test now executes not only during making new release, but also pushing new commit in branches.
The test result of commit is displayed in the build in Github Action. It shows whether benchmarks of current commit over the pre-defined threshold, while the benchmarks chart keeps displaying
the test result of each library version.

- 🐞 **Bug Fixes**
- Fix NPE in ProductSync benchmarks test for SDK-v2 [#874](https://github.com/commercetools/commercetools-sync-java/pull/874)

- 🛠️ **Dependency Updates**
- Migrated `com.commercetools.sdk` from `9.4.0` to [`9.5.0`](https://github.com/commercetools/commercetools-sdk-java-v2/releases/tag/9.5.0)
Expand All @@ -49,7 +52,7 @@
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/9.0.3...9.1.0) |
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/9.1.0/) |
[Jar](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/9.1.0/jar)
- 🐞 **Enhancement** (1)
- **Enhancement** (1)
- Java SDK-v2 Compatible layer adaption [#859](https://github.com/commercetools/commercetools-sync-java/pull/859)

Commercetools has already developed [next generation Java SDK (Java-SDK-v2)](https://github.com/commercetools/commercetools-sdk-java-v2) for communication between client-side and the platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ final class BenchmarkUtils {
static void saveNewResult(
@Nonnull final String sync, @Nonnull final String benchmark, final double newResult)
throws IOException {

final JsonNode rootNode = new ObjectMapper().readTree(getFileContent());
final JsonNode withNewResult = addNewResult(rootNode, sync, benchmark, newResult);
writeToFile(withNewResult.toString());
Expand Down Expand Up @@ -89,6 +88,7 @@ private static ObjectNode createVersionNode() {

final ObjectNode newVersionNode = JsonNodeFactory.instance.objectNode();
newVersionNode.set(PRODUCT_SYNC, createSyncNode());
newVersionNode.set(PRODUCT_SYNC_SDK_V2, createSyncNode());
newVersionNode.set(INVENTORY_SYNC, createSyncNode());
newVersionNode.set(CATEGORY_SYNC, createSyncNode());
newVersionNode.set(PRODUCT_TYPE_SYNC, createSyncNode());
Expand Down

0 comments on commit db9718a

Please sign in to comment.