Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel testing: how to collect stdout of _all_ tests (including paused tests) in verbose mode. #33706

Closed
medyagh opened this issue Aug 18, 2019 · 1 comment

Comments

@medyagh
Copy link

medyagh commented Aug 18, 2019

Recenetly we made minikube's integeration tests to run in parallel. (since we spin up 30+ VMs and we wanted to speed up the process)

Recently I added a logging in this PR:

elapsed := time.Since(start) 
glog.Infof("duration metric: took %s to wait for %s ...", elapsed, label)

to ouptput how long the health check waited for each component of kubernetes.

however in our more than 30+ tests, I noticed it only outputs at most 2 times, and sometimes not at all, my initial suspection is: most probably the test go to "Pause" and when they are in "Pause" they do not print out anything and when they are changed from PAUSE to RUN, we loose bunch of logs.

we run our tests with verbose options and --alsologtostderr -v=8

is there any way to make sure the stdout logs are recorded somewhere for all the tests ? not just the one in the foreground ?

here is the code snippet if it helps :

	start := time.Now()
	glog.Infof("Waiting for pod with label %q in ns %q ...", ns, label)
	f := func() (bool, error) {
	     /// .... some function that checks for a specific pod to be running
	}
	err := wait.PollImmediate(kconst.APICallRetryInterval, ReasonableStartTime, f)
	elapsed := time.Since(start)
        //  This is the line I wanna see in the logs all the time !
	glog.Infof("duration metric: took %s to wait for %s ...", elapsed, label)
	return err

@medyagh medyagh changed the title parallel testing: how to collect stdout of _all_ tests (including paused tests) ? parallel testing: how to collect stdout of _all_ tests (including paused tests) in verbose mode. Aug 18, 2019
@bcmills
Copy link
Contributor

bcmills commented Aug 19, 2019

This issue seems to be a question about how to use Go, rather than a feature request or defect report about the Go language and/or toolchain.

We have decided that our experiment to allow questions on the issue tracker has not had the outcome we desired, so I am closing this issue. I'm sorry that we can't answer your question here.

There are many other methods to get help if you're still looking for answers:

Thanks

@bcmills bcmills closed this as completed Aug 19, 2019
@golang golang locked and limited conversation to collaborators Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants