Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 478013d

Browse files
committed
rename run_client to on_script_start
1 parent 79545e1 commit 478013d

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

tests/oteltest/example_scripts/simple_loop.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import time
16-
from typing import Mapping, Optional, Sequence
1716

1817
from opentelemetry import trace
1918
from oteltest import OtelTest, Telemetry
@@ -39,8 +38,7 @@ def environment_variables(self):
3938
def wrapper_script(self):
4039
return "opentelemetry-instrument"
4140

42-
def run_client(self):
43-
print("run_client()")
41+
def on_script_start(self):
4442
return None
4543

4644
def validate(self, telemetry: Telemetry):

tests/oteltest/src/oteltest/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def wrapper_script(self) -> str:
129129
pass
130130

131131
@abc.abstractmethod
132-
def run_client(self) -> Optional[float]:
132+
def on_script_start(self) -> Optional[float]:
133133
pass
134134

135135
@abc.abstractmethod

tests/oteltest/src/oteltest/private.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ def run_python_script(script, script_dir, oteltest_instance: OtelTest, v):
9696
env=oteltest_instance.environment_variables(),
9797
)
9898

99-
timeout = oteltest_instance.run_client()
99+
timeout = oteltest_instance.on_script_start()
100100
if timeout is None:
101101
print(
102-
f"- Will wait indefinitely for {script} to finish (max_wait is None)"
102+
f"- Will wait indefinitely for {script} to finish (on_script_start() returned None)"
103103
)
104104
else:
105105
print(

0 commit comments

Comments
 (0)