Coder Social home page Coder Social logo

Comments (2)

oserohin avatar oserohin commented on June 12, 2024

Hello guys, any updates/suggestions about this issue?
Still present in SpringBoot 2.7.0 (Spring 5.3.20), Netty 4.1.77.Final and BlockHound 1.0.6.RELEASE

from blockhound.

pderop avatar pderop commented on June 12, 2024

Hi @oserohin ,

We are back to maintenance of blockhound, sorry for the delay.

I have attached the reproducer demo.tgz project, to reproduce: "./gradlew test -i"

But I don't think it's a BlockHound issue. it's just that during the test, the HttpHandlerConnector schedules in the parallel scheduler the doConnect which ends up calling MimeTypeUtils. initRandom

and indeed, SecureRandom.next is a blocking operation. However, I see that the MimeTypeUtils.initRandom initializes the SecureRandom lazily (the method will call SecureRandom.next only one time, the first time initRandom will be called.

So, you can decide to either:

  • from your junit tests, allow MimeTypeUtils.initRandom to block using a BlockHound integration plugin
  • or during test initialization, call MimeTypeUtils.generateMultipartBoundary, this will force the initialization of the SecureRandom, so during your test, the method won't block while running within the parallel scheduler
  • or if you think it's really an issue, then please report this to the spring-framework webflux team

if you don't mind, I will close this issue, feel free to reopen if needed; thanks.

from blockhound.

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.