Giter VIP home page Giter VIP logo

Comments (4)

jaydeepparekh1311 avatar jaydeepparekh1311 commented on May 26, 2024 2

@stevehu - Yes, that change would make sense so that we are covered for very quick responses scenario, which might be a possibility on some builds and tests that run on different platforms.

Will get a PR created for this.

from light-4j.

stevehu avatar stevehu commented on May 26, 2024

I am trying to build the snapshot version on the branch but go the following error.

09:05:25.680 [Client I/O-1]       DEBUG c.networknt.client.oauth.OauthHelper - getToken response = {"access_token":"eyJraWQiOiIxMDAiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ1cm46Y29tOm5ldHdvcmtudDpvYXV0aDI6djEiLCJhdWQiOiJ1cm46Y29tLm5ldHdvcmtudCIsImV4cCI6MTY5ODc1NzUzMCwianRpIjoiSlhzYl93cEtISmZtZ1pBUm83WHZpZyIsImlhdCI6MTY5ODc1NzUyNSwibmJmIjoxNjk4NzU3NDA1LCJ2ZXJzaW9uIjoiMS4wIiwidXNlcl9pZCI6InN0ZXZlIiwidXNlcl90eXBlIjoiRU1QTE9ZRUUiLCJjbGllbnRfaWQiOiJhYWFhYWFhYS0xMjM0LTEyMzQtMTIzNC1iYmJiYmJiYiIsInNjb3BlIjpbImFwaS5yIiwiYXBpLnciXX0.sL51lk5IaJXMd5vQdlBRZdVLymihm2NPflbCGWRIFb8978p4l75tBg5O_Ivy6YdPnwArDaFmODqsi-BJ6KmOu29Qh02-zsKYyWByGL5RWPVmH3q-0_C4VXs-wJ89-QkZUmjXwnJm3xlIQ5J1Z5Xf6UMgBpvtbiRODgbd8ibklYoyqGixg9Gvh2QtSqSdfZ-UdYe4A5Xf9CBFCbbI9Mek1cOYotjqC-Rt0FvGE_3D0_04GGf8P-C_E8ltuP1Q10qChMIZZJxAeDsIRk4u1PPM2DjLYxbBEabsL0zRIoX_uI1MPehgcXKQO4KpLqAJdpS4H0Ya2LesmELu_8aiHbr2-g","token_type":"Bearer","expires_in":5}
09:05:25.680 [pool-17-thread-1]       INFO  c.networknt.client.oauth.OauthHelper - Get client credentials token com.networknt.client.oauth.Jwt@38c570b1 with expire_in 5 seconds
The server is stopped.
[ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 13.234 s <<< FAILURE! - in com.networknt.client.Http2ClientPoolTest
[ERROR] testResponseTime(com.networknt.client.Http2ClientPoolTest)  Time elapsed: 0.009 s  <<< FAILURE!
java.lang.AssertionError
	at com.networknt.client.Http2ClientPoolTest.testResponseTime(Http2ClientPoolTest.java:289)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   Http2ClientPoolTest.testResponseTime:289
[INFO] 
[ERROR] Tests run: 60, Failures: 1, Errors: 0, Skipped: 0

This is the second time I am getting this error, and I think it is a timing issue. Please note that the issue is in the client module and might not related to the current issue. Thanks.

from light-4j.

jaydeepparekh1311 avatar jaydeepparekh1311 commented on May 26, 2024

@stevehu - I ran all the unit tests on the current light4j 1.6.x branch multiple times on my machine (via Mac terminal and IDE) and none of the runs had any issues

Below is the latest result summary:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Parent POM 1.6.46-SNAPSHOT:
[INFO] 
[INFO] Parent POM ......................................... SUCCESS [  1.504 s]
[INFO] decryptor .......................................... SUCCESS [  4.011 s]
[INFO] config ............................................. SUCCESS [  7.255 s]
[INFO] utility ............................................ SUCCESS [  4.810 s]
[INFO] http-string ........................................ SUCCESS [  1.369 s]
[INFO] http-url ........................................... SUCCESS [  3.694 s]
[INFO] service ............................................ SUCCESS [  4.243 s]
[INFO] status ............................................. SUCCESS [  5.283 s]
[INFO] common ............................................. SUCCESS [  4.109 s]
[INFO] handler ............................................ SUCCESS [  4.395 s]
[INFO] monad-result ....................................... SUCCESS [  3.849 s]
[INFO] switcher ........................................... SUCCESS [  3.034 s]
[INFO] registry ........................................... SUCCESS [  4.772 s]
[INFO] balance ............................................ SUCCESS [  3.351 s]
[INFO] cluster ............................................ SUCCESS [  3.855 s]
[INFO] client ............................................. SUCCESS [01:12 min]
[INFO] exception .......................................... SUCCESS [  4.257 s]
[INFO] security ........................................... SUCCESS [  5.652 s]
[INFO] correlation ........................................ SUCCESS [  4.286 s]
[INFO] mask ............................................... SUCCESS [  4.063 s]
[INFO] body ............................................... SUCCESS [  7.137 s]
[INFO] audit .............................................. SUCCESS [ 13.283 s]
[INFO] dump ............................................... SUCCESS [  5.204 s]
[INFO] info ............................................... SUCCESS [  4.604 s]
[INFO] health ............................................. SUCCESS [  4.297 s]
[INFO] header ............................................. SUCCESS [  4.142 s]
[INFO] consul ............................................. SUCCESS [ 14.496 s]
[INFO] zookeeper .......................................... SUCCESS [  7.745 s]
[INFO] server ............................................. SUCCESS [ 10.010 s]
[INFO] metrics ............................................ SUCCESS [ 12.022 s]
[INFO] prometheus ......................................... SUCCESS [  5.026 s]
[INFO] sanitizer .......................................... SUCCESS [  4.563 s]
[INFO] traceability ....................................... SUCCESS [  4.327 s]
[INFO] cors ............................................... SUCCESS [  4.722 s]
[INFO] rate-limit ......................................... SUCCESS [  4.857 s]
[INFO] email-sender ....................................... SUCCESS [  3.670 s]
[INFO] resource ........................................... SUCCESS [  4.249 s]
[INFO] content ............................................ SUCCESS [  4.300 s]
[INFO] data-source ........................................ SUCCESS [  5.741 s]
[INFO] basic-auth ......................................... SUCCESS [  4.853 s]
[INFO] deref-token ........................................ SUCCESS [  4.660 s]
[INFO] ip-whitelist ....................................... SUCCESS [  4.609 s]
[INFO] encode-decode ...................................... SUCCESS [  5.287 s]
[INFO] logger-config ...................................... SUCCESS [  1.642 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:56 min
[INFO] Finished at: 2023-10-31T10:55:50-04:00
[INFO] ------------------------------------------------------------------------

The below line in the unit test where it failed seems to be a timing based issue and based on the analysis, looks like that the response received was in < 1 ms and probably that's where the value of ar.result().getResponseTime() would be equal to 0.

Assert.assertTrue(ar.result().getResponseTime() > 0);

Would you be able to re-run the build at your end and see if it works?

from light-4j.

stevehu avatar stevehu commented on May 26, 2024

I can still reproduce it frequently(about a 25% chance). One thing I have realized is that my build time is shorter than yours, and chances are the response time is less than 1ms. I would suggest changing the assertion to >= 0. What do you think?

from light-4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.