diff --git a/.kokoro/environment_tests.sh b/.kokoro/environment_tests.sh index 2b6fa5177..c80c51d65 100755 --- a/.kokoro/environment_tests.sh +++ b/.kokoro/environment_tests.sh @@ -49,12 +49,11 @@ gcloud config set compute/zone us-central1-b # authenticate docker gcloud auth configure-docker -q -# Remove old nox -python3.6 -m pip uninstall --yes --quiet nox-automation - # Install nox -python3.6 -m pip install --upgrade --quiet nox -python3.6 -m nox --version +virtualenv .venv +source .venv/bin/activate +python3 -m pip install --upgrade --quiet nox +python3 -m nox --version # Install kubectl if [[ "${ENVIRONMENT}" == "kubernetes" ]]; then @@ -73,7 +72,7 @@ echo $ENVCTL_ID # Run the specified environment test set +e -python3.6 -m nox --session "tests(language='python', platform='$ENVIRONMENT')" +python3 -m nox --session "tests(language='python', platform='$ENVIRONMENT')" TEST_STATUS_CODE=$? # destroy resources diff --git a/.kokoro/performance/presubmit.cfg b/.kokoro/performance/performance.cfg similarity index 100% rename from .kokoro/performance/presubmit.cfg rename to .kokoro/performance/performance.cfg diff --git a/tests/performance/test_performance.py b/tests/performance/test_performance.py index 0f9888f7a..d028a49e8 100644 --- a/tests/performance/test_performance.py +++ b/tests/performance/test_performance.py @@ -196,7 +196,7 @@ def test_client_init_performance(self, time_limit=0.25): total_time = self._print_results(pr, results, time_limit, "Client Init") self.assertLessEqual(total_time, time_limit) - def test_structured_logging_performance(self, time_limit=10): + def test_structured_logging_performance(self, time_limit=12): """ Test the performance of StructuredLoggingHandler @@ -278,7 +278,7 @@ def profiled_code(logger, payload, num_logs=100, flush=False): total_time = self._print_results(pr, results, time_limit, "CloudLoggingHandler") self.assertLessEqual(total_time, time_limit) - def test_logging_performance(self, time_limit=15): + def test_logging_performance(self, time_limit=20): """ Test the performance of logger @@ -312,7 +312,7 @@ def profiled_code(logger, payload, num_logs=100): total_time = self._print_results(pr, results, time_limit, "Logger.Log") self.assertLessEqual(total_time, time_limit) - def test_batch_performance(self, time_limit=10): + def test_batch_performance(self, time_limit=12): """ Test the performance of logger