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

kubectl log --since e2e test is hard to debug #20287

Closed
mml opened this issue Jan 28, 2016 · 0 comments
Closed

kubectl log --since e2e test is hard to debug #20287

mml opened this issue Jan 28, 2016 · 0 comments
Assignees

Comments

@mml
Copy link
Contributor

mml commented Jan 28, 2016

I noticed this flake by looking at the submit queue. The test is simple, but when it fails, we have no good way to debug it.

• Failure [12.004 seconds]
Kubectl client
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:992
  Kubectl logs
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:781
    should be able to retrieve and filter logs [Conformance] [It]
    /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:780

    Expected
        <int>: 23
    to be <
        <int>: 23

    /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:778

Below is the test in question. When the test fails, we should print the lines we got in each case.

        By("restricting to a time range")
        time.Sleep(1500 * time.Millisecond) // ensure that startup logs on the node are seen as older than 1s
        out = runKubectlOrDie("log", pod.Name, containerName, nsFlag, "--since=1s")
        recent := len(strings.Split(out, "\n"))
        out = runKubectlOrDie("log", pod.Name, containerName, nsFlag, "--since=24h")
        older := len(strings.Split(out, "\n"))
        Expect(recent).To(BeNumerically("<", older))
@mml mml self-assigned this Jan 28, 2016
mml added a commit to mml/kubernetes that referenced this issue Jan 28, 2016
@mml mml added the area/test label Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant