xDS interop: log the subTest start and beginning (#30517)

To improve debugging of the tests with steps that look similar, f.e. failover.
Makes the end of one subtest, and the beginning of the next one much clearer.

Note: URL map test suite does not use subtests, so I didn't add the logging there.
pull/30520/head
Sergii Tkachenko 3 years ago committed by GitHub
parent 45460e1f87
commit 351bfad1f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      tools/run_tests/xds_k8s_test_driver/framework/xds_k8s_testcase.py

@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import abc
import contextlib
import datetime
import enum
import hashlib
@ -169,6 +170,14 @@ class XdsKubernetesBaseTestCase(absltest.TestCase):
cls.secondary_k8s_api_manager.close()
cls.gcp_api_manager.close()
@contextlib.contextmanager
def subTest(self, msg, **params): # noqa pylint: disable=signature-differs
logger.info('--- Starting subTest %s.%s ---', self.id(), msg)
try:
yield super().subTest(msg, **params)
finally:
logger.info('--- Finished subTest %s.%s ---', self.id(), msg)
def setupTrafficDirectorGrpc(self):
self.td.setup_for_grpc(self.server_xds_host,
self.server_xds_port,

Loading…
Cancel
Save