timoninmaxim commented on a change in pull request #8109: URL: https://github.com/apache/ignite/pull/8109#discussion_r465093069
########## File path: modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/DataGenerationApplication.java ########## @@ -34,13 +35,13 @@ public DataGenerationApplication(Ignite ignite) { } /** {@inheritDoc} */ - @Override protected void run(String[] args) { + @Override protected void run(JsonNode jsonNode) { log.info("Creating cache..."); - IgniteCache<Integer, Integer> cache = ignite.createCache(args[0]); + IgniteCache<Integer, Integer> cache = ignite.createCache(jsonNode.get("cacheName").asText()); try (IgniteDataStreamer<Integer, Integer> stmr = ignite.dataStreamer(cache.getName())) { - for (int i = 0; i < Integer.parseInt(args[1]); i++) { + for (int i = 0; i < jsonNode.get("range").asInt(); i++) { Review comment: Oh, I see. I thought that JsonNode is a generic, but it's not. So, there is a choose between plain JsonNode and DTO. In favor of latter: 1. Currently there are not, but in one day could be complex json with nested objects and arrays. User will have to use `mapper.readValue(jsonNode, DTO.class)` if need it. 2. If you want change code of your app in one day and change params, there won't help from IDE for you. There is a possibility of NPE in jsonNode.get(). DTO provides checks for such situations (code fails in compile time). 3. All tests have own package, so I don't see problems with additional classes that are isolated within a package. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org