Skip to content

Conversation

@jlewi
Copy link
Contributor

@jlewi jlewi commented Dec 28, 2017

  • Define a wrap_test function that takes care of some of the repitive work
    of configuring a TestCase object.

  • Define a TestSuite class to represent more than 1 TestCase.

    • This should make it easy to define a suite of TestCases ahead of time
      so that if we abort early, the junit file will still have an entry for
      all test cases even the ones that didn't get run.
  • airflow.py should set the logging formatter for the logger that logs to a
    file. The file handler doesn't appear to pick up the BasicConfig.


This change is Reviewable

* Define a wrap_test function that takes care of some of the repitive work
  of configuring a TestCase object.

* Define a TestSuite class to represent more than 1 TestCase.
  * This should make it easy to define a suite of TestCases ahead of time
    so that if we abort early, the junit file will still have an entry for
    all test cases even the ones that didn't get run.

* airflow.py should set the logging formatter for the logger that logs to a
  file. The file handler doesn't appear to pick up the BasicConfig.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 37.782% when pulling d6557b1 on jlewi:kubeflow_testing into 420f9aa on tensorflow:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 37.782% when pulling d6557b1 on jlewi:kubeflow_testing into 420f9aa on tensorflow:master.

from py import util

# TODO(jlewi): How can we indicate that a test wasn't run?
class TestCase(object):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

library suggestion: https://github.com/python-attrs/attrs or namedtuple

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant in the junit.xml file that is created and uploaded to gubernator.
I ended up marking the test as failed with a failure message of "Test not run."
PTAL>

"Timeout waiting for deployment {0} in namespace {1}".format(
name, namespace))

def wait_for_statefulset(api_client, namespace, name):
Copy link
Member

@jimexist jimexist Dec 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this feeling that wait for $resource_type to be $ready|created|deleted is commonly used and repeatedly reimplemented in both Python and Golang

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. Do you know if there is a common library somewhere?

@coveralls
Copy link

coveralls commented Dec 28, 2017

Coverage Status

Coverage remained the same at 37.782% when pulling b2acbb1 on jlewi:kubeflow_testing into 420f9aa on tensorflow:master.

@jlewi
Copy link
Contributor Author

jlewi commented Dec 29, 2017

@jimexist anymore comments?

@jimexist
Copy link
Member

@jlewi not really. regarding the repeated code patterns I only thought that certain functions can live in its own (python) package in order to facilitate any code trying to test against k8s server.

@jlewi jlewi merged commit 430cf17 into kubeflow:master Dec 29, 2017
sutaakar pushed a commit to sutaakar/training-operator that referenced this pull request Mar 25, 2025
Signed-off-by: konflux-internal-p02 <170854209+konflux-internal-p02[bot]@users.noreply.github.com>
Co-authored-by: konflux-internal-p02[bot] <170854209+konflux-internal-p02[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants