Comments (4)
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.
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.
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.
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)
- DeferCleanup() blocks are run after all AfterEach() blocks, regardless of nesting HOT 2
- Is there a way to populate dynamic data in the Tree Construction Phase? HOT 2
- Detail Skipped reason when spec is skipped by cli arguments HOT 6
- Support customizing the SpecContext HOT 4
- ginkgo v2 leaks goroutine HOT 3
- Proposal: RunSpecsWithContext? HOT 14
- Add option to StandardReporter to display things better on github actions HOT 2
- Call dynamic variables through 2 test files. HOT 1
- Skip each test function logs and print in summary HOT 1
- Run a single suite with N instances in parallel with different `BeforeSuite` Setup. HOT 3
- Feeding report back for focusing on failed test-cases HOT 1
- Junit report should have system-out HOT 1
- could not log in Eventually with fmt.Fprintf(GinkgoWriter) HOT 3
- Question: One Suite to rule them all HOT 2
- when using concurrency, a test case failure in a background go routine does not show which test case failed HOT 3
- Add cli flag to fail when no tests were run HOT 1
- `ginko -p 2` does not complain about having an extra argument
- How to integrate with xgo? HOT 7
- when watching, add ability to ignore hidden files (including tests!) HOT 5
- Report Portal and Gingko integration plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ginkgo.