Giter VIP home page Giter VIP logo

Comments (4)

onsi avatar onsi commented on June 7, 2024 1

oh duh, sorry. I'm not yet planning on making them interruptible. But you should be able to override GracePeriod on them and the fact that you can't is an oversight on my part.

For now you can simpy use ginkgo -grace-period=10m - this will apply to all nodes but I suspect that will probably be OK for you. You can also look into adjusting the total suite timeout so that the interruption doesn't happen any way!

from ginkgo.

yuhanqiutg avatar yuhanqiutg commented on June 7, 2024

https://github.com/onsi/ginkgo/blob/master/internal/suite.go#L842
I found the code here, that's why ReportAfterSuite takes default GracePeriod (https://github.com/onsi/ginkgo/blob/master/types/config.go#L51) as its timeout. Is it an expected behavior that every ReportAfter node will timeout according to global GracePeriod? @onsi

from ginkgo.

onsi avatar onsi commented on June 7, 2024

Hey there,

The issue is that the entire suite is timing out because of the suite timeout (which you can modify using ginkgo -timout=X). Once the suite times out Ginkgo needs everything to finish up and the ReportAfterSuite is being given a period of time (called the GracePeriod) to finish up.

You can increase the ReportAfterSuite’s GracePeriod like this:

var _ = ReportAfterSuite(“foo”, func(r Report) {
    …
}, GracePeriod(10*time.Minute))

There are more details here: https://onsi.github.io/ginkgo/#spec-timeouts-and-interruptible-nodes

from ginkgo.

colintg avatar colintg commented on June 7, 2024

Hi @onsi , thanks for your timely response!

ReportAfterSuite doesn't allow add NodeTimeout or GracePeriod at this time, it would report a runtime error

  Invalid NodeTimeout SpecTimeout, or GracePeriod

  var _ = ginkgo.ReportAfterSuite("", func(report types.Report) {
    [ReportAfterSuite] was passed NodeTimeout, SpecTimeout, or GracePeriod but
    does not have a callback that accepts a SpecContext or context.Context.  You
    must accept a context to enable timeouts and grace periods

I found this in the official doc:

Currently the Reporting nodes (ReportAfterEach, ReportAfterSuite, and ReportBeforeEach) cannot be made interruptible and do not accept callbacks that receive a SpecContext. This may change in a future release of Ginkgo (in a backward compatible way).

Do we have a plan at this moment for realizing this feature in the near future?

from ginkgo.

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.