getgauge-contrib / gauge-go

Go language plugin for Gauge
GNU General Public License v3.0
71 stars 21 forks source link

config option to change go test -timeout from default 10 mins #24

Closed gaunty closed 4 years ago

gaunty commented 4 years ago

HI We have some specs which take longer than 10 mins,and multiple specs within a folder which combined take longer than 10 minutes.

when a spec takes longer than 10 minutes, this error will occur fs 0x0 gs 0x0 *** Test killed with quit: ran too long (11m0s). FAIL command-line-arguments 660.010s

After drilling down into this, when running go test it will default to 10 mnutes.

We have temporily changed the arguments within gauge/builder.go

if err := util.RunCommand(os.Stdout, os.Stdout, constants.CommandGo, "test","-timeout","0", "-v", gaugeGoMainFile); err != nil { return fmt.Errorf("Failed to compile project: %s\nPlease ensure the project is in GOPATH.\n", err.Error()) }

It would be good if this could be changed via gauge/config/gauge.properties Ot if there is another option to prevent the gauge specs failing for long running tests.

Thanks

Steve

sriv commented 4 years ago

It would be good if this could be changed via gauge/config/gauge.properties

That sounds sensible, except I'd recommend setting it at a project level (i.e. in env/default/go.properties)

Would you like to raise a PR for this, given you've figured what would work?

opursaill commented 4 years ago

As gauge already has the functionality to set timeouts, woudn't just removing the timeout from gauge-go be good enough? I mean just by making the change that Gaunty suggested

if err := util.RunCommand(os.Stdout, os.Stdout, constants.CommandGo, "test","-timeout","0", "-v", gaugeGoMainFile)
sriv commented 4 years ago

sounds good. the PR has been merged. Thanks for the contribution.

gaunty commented 4 years ago

Hi Thanks for the merge of the pull request, very much appreciated .

As I don’t have permissions , what’s the beat way to move this forward to push a release for v0.1.4?

Thanks

Steve

Sent from my iPhone

On 6 Apr 2020, at 13:38, Srikanth notifications@github.com wrote:

 sounds good. the PR has been merged. Thanks for the contribution.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sriv commented 4 years ago

hi @gaunty - I'll try to make a release from my end, seems like we are lacking some scripts in this repo, which automates the release process.

sriv commented 4 years ago

fixed via #25