Out of 3 tests, first one is failing

// ./gradlew run --args=“trades.json 2020-01-01”
// ./gradlew run --args=“trades.json 2019-07-01”
// ./gradlew run --args=“trades.json 2019-12-03”

out of these three tests in Module 2. Frist one is failing with this error.
Welcome to Gradle 5.2.1!

Here are the highlights of this release:

  • Define sets of dependencies that work together with Java Platform plugin
  • New C++ plugins with dependency management built-in
  • New C++ project types for gradle init - Service injection into plugins and project extensions
    For more details see https://docs.gradle.org/5.2.1/release-notes.html

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

Task :qmoney:run
[AAPL, MSFT, GOOGL]
Mar 05, 2020 3:02:52 PM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: [“AAPL”,“MSFT”,“GOOGL”]
https://api.tiingo.com/tiingo/daily/AAPL/prices?startDate=2019-01-02&endDate=2020-01-01&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e16
15:02:54.481 [main] ERROR com.crio.warmup.stock.log.UncaughtExceptionHandler - {“stacktrace”:[“java.util.Optional.get(Optional.java:135
)”,“com.crio.warmup.stock.PortfolioManagerApplication.mainReadQuotes(PortfolioManagerApplication.java:175)”,“com.crio.warmup.stock.Port
folioManagerApplication.main(PortfolioManagerApplication.java:209)”],“cause”:“java.util.NoSuchElementException: No value present”}
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_242]
at com.crio.warmup.stock.PortfolioManagerApplication.mainReadQuotes(PortfolioManagerApplication.java:175) ~[main/:?]
at com.crio.warmup.stock.PortfolioManagerApplication.main(PortfolioManagerApplication.java:209) ~[main/:?]

Task :qmoney:run FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:qmoney:run’.

Process ‘command ‘/usr/lib/jvm/java-8-openjdk-amd64/bin/java’’ finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 14s
3 actionable tasks: 2 executed, 1 up-to-date
crio-user@ayusha04:~/workspace/ayusha04-ME_QMONEY$ ./gradlew run --args=“trades.json 2019-07-01”

Task :qmoney:run
[AAPL, MSFT, GOOGL]
Mar 05, 2020 3:03:30 PM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: [“AAPL”,“MSFT”,“GOOGL”]
https://api.tiingo.com/tiingo/daily/AAPL/prices?startDate=2019-01-02&endDate=2019-07-01&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e16
https://api.tiingo.com/tiingo/daily/MSFT/prices?startDate=2019-01-02&endDate=2019-07-01&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e16
https://api.tiingo.com/tiingo/daily/GOOGL/prices?startDate=2019-01-02&endDate=2019-07-01&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e1
Mar 05, 2020 3:03:32 PM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: [“MSFT”,“AAPL”,“GOOGL”]

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 3s
3 actionable tasks: 1 executed, 2 up-to-date
crio-user@ayusha04:~/workspace/ayusha04-ME_QMONEY$ ./gradlew run --args=“trades.json 2019-12-03”

Task :qmoney:run
[AAPL, MSFT, GOOGL]
Mar 05, 2020 3:03:43 PM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: [“AAPL”,“MSFT”,“GOOGL”]
https://api.tiingo.com/tiingo/daily/AAPL/prices?startDate=2019-01-02&endDate=2019-12-03&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e16
https://api.tiingo.com/tiingo/daily/MSFT/prices?startDate=2019-01-02&endDate=2019-12-03&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e16
https://api.tiingo.com/tiingo/daily/GOOGL/prices?startDate=2019-01-02&endDate=2019-12-03&token=b58cb63d79de2ddcaf52d57ade8f525a1bc34e1
Mar 05, 2020 3:03:46 PM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: [“MSFT”,“AAPL”,“GOOGL”]

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4s
3 actionable tasks: 1 executed, 2 up-to-date

Check the stack trace, it shows line number 175 in portfolioManagerApplication java file in the first test
There’s some error in your logic, can re-check

sometimes there might be two iterations in code,the values of endDate might not yield proper response for 2020-01-01 hence you might have to change the value to the very next working day

I’m closing this topic due to no response from anyone since last 15 hours. If your query is resolved you can mark any reply as a solution. If you still have the query, please create a new topic paste the link of this topic in the description.