Repository navigation
Expand file tree
/
Copy pathintegration_tests.py
More file actions
772 lines (544 loc) · 24.6 KB
/
Copy pathintegration_tests.py
File metadata and controls
772 lines (544 loc) · 24.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
"""
Integration Tests for Flyte SDK Examples
This module contains integration tests for all runnable examples in the examples/ directory.
Tests are organized by category and use pytest markers for selective execution.
Test Execution Tiers:
- Tier 1: Core tests (every PR)
pytest -m "integration and not (gpu or external or stress or apps or secrets)"
- Tier 2: Including apps (nightly)
pytest -m "integration and not (gpu or external or stress or secrets)"
- Tier 3: GPU tests (weekly, GPU runners)
pytest -m "integration and gpu"
- Tier 4: All tests (manual)
pytest -m "integration"
"""
import logging
import os
import re
from datetime import datetime, timedelta
import pytest
import flyte
# =============================================================================
# FIXTURES
# =============================================================================
@pytest.fixture(scope="session")
def flyte_client():
"""
Initialize Flyte client once for all tests.
"""
if os.getenv("GITHUB_ACTIONS", "") == "true":
flyte.init(
endpoint=os.getenv("FLYTE_ENDPOINT", "dns:///playground.canary.unionai.cloud"),
api_key=os.getenv("FLYTE_API_KEY"),
insecure=False,
image_builder="remote",
project=os.getenv("FLYTE_PROJECT", "flyte-sdk"),
domain=os.getenv("FLYTE_DOMAIN", "development"),
)
else:
flyte.init(
endpoint=os.getenv("FLYTE_ENDPOINT", "dns:///playground.canary.unionai.cloud"),
auth_type="Pkce",
insecure=False,
image_builder="remote",
project=os.getenv("FLYTE_PROJECT", "flyte-sdk"),
domain=os.getenv("FLYTE_DOMAIN", "development"),
)
yield flyte
# =============================================================================
# HELPER FUNCTIONS
# =============================================================================
# Matches Go-style template placeholders like {{ .nodeID }} that should have
# been rendered server-side before the log link is returned to the client.
_TEMPLATE_RE = re.compile(r"{{.*?}}")
def _verify_log_links(detail, test_name: str):
"""
Verify that the task log links returned for a completed action are valid.
Checks the most recent attempt of the action and asserts that every log
entry:
- has a non-empty name and uri
- contains no unrendered template placeholders (e.g. ``{{ .nodeID }}``)
in either the name or the uri
- has a uri that looks like a real link (absolute URL or path)
Args:
detail: The ActionDetails for the completed action.
test_name: Name of the test for logging/assertion messages.
"""
attempts = detail.pb2.attempts
if not attempts:
return
# Some tasks (e.g. quick local-style tasks) may not surface any log links;
# only validate the format of the links that are present.
log_info = attempts[-1].log_info
if not log_info:
print(" No log links to verify")
return
for log in log_info:
print(f" Log link: {log.name}: {log.uri}")
assert log.name, f"[{test_name}] log link is missing a name: {log}"
assert log.uri, f"[{test_name}] log link '{log.name}' is missing a uri"
for field_name, value in (("name", log.name), ("uri", log.uri)):
match = _TEMPLATE_RE.search(value)
assert match is None, (
f"[{test_name}] log link '{log.name}' has an unrendered template in its {field_name}: {value!r}"
)
assert log.uri.startswith(("http://", "https://", "/")), (
f"[{test_name}] log link '{log.name}' has an unexpected uri format: {log.uri!r}"
)
async def _run_and_wait(task_fn, test_name: str, **kwargs):
"""
Helper function to run a Flyte task and wait for completion.
Args:
task_fn: The task function to run
test_name: Name of the test for logging purposes
**kwargs: Keyword arguments to pass to the task
Raises:
Any exception raised by run.wait() will propagate
"""
run = await flyte.with_runcontext(log_level=logging.DEBUG).run.aio(task_fn, **kwargs)
print(f"\n[{test_name}]")
print(f" Run name: {run.name}")
print(f" Run URL: {run.url}")
run.wait()
detail = await run.action.details()
if detail.error_info:
raise RuntimeError(f"Run failed with error: {detail.error_info.message}")
_verify_log_links(detail, test_name)
print(" Completed successfully\n")
async def _deploy_and_verify(env_or_app, test_name: str):
"""
Helper function to deploy an app and verify deployment succeeded.
Args:
env_or_app: The AppEnvironment or app to deploy
test_name: Name of the test for logging purposes
Returns:
List of Deployment objects
"""
deployments = await flyte.deploy.aio(env_or_app)
print(f"\n[{test_name}]")
for deployment in deployments:
for env_name, deployed_env in deployment.envs.items():
print(f" Deployed: {deployed_env.get_name()}")
print(" Deployment successful\n")
return deployments
# =============================================================================
# BASICS - CORE EXAMPLES (existing tests)
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_hello(flyte_client):
"""Test the basics.hello example with a list of integers."""
from examples.basics.hello import main
await _run_and_wait(main, "test_basics_hello", x_list=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
@pytest.mark.integration
@pytest.mark.asyncio
async def test_flyte_file(flyte_client):
"""Test the Flyte File async API example."""
from examples.basics.file import main
await _run_and_wait(main, "test_flyte_file")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_flyte_directory(flyte_client):
"""Test the Flyte Directory async API example."""
from examples.basics.dir import main
await _run_and_wait(main, "test_flyte_directory")
# =============================================================================
# BASICS - ADDITIONAL TESTS
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_map(flyte_client):
"""Test the basics.map example with map/reduce pattern."""
from examples.basics.map import main
await _run_and_wait(main, "test_basics_map", n=5)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_enum_vals(flyte_client):
"""Test the basics.enum_vals example with enums and literals."""
from examples.basics.enum_vals import main
await _run_and_wait(main, "test_basics_enum_vals")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_frames(flyte_client):
"""Test the basics.frames example with pandas DataFrames."""
from examples.basics.frames import main
await _run_and_wait(main, "test_basics_frames")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_from_scratch(flyte_client):
"""Test the basics.from_scratch example."""
from examples.basics.from_scratch import main
await _run_and_wait(main, "test_basics_from_scratch", n=5)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_no_outputs(flyte_client):
"""Test the basics.no_outputs example with void return."""
from examples.basics.no_outputs import main
await _run_and_wait(main, "test_basics_no_outputs")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_repeated_tasks(flyte_client):
"""Test the basics.repeated_tasks example with many task invocations."""
from examples.basics.repeated_tasks import main_task
await _run_and_wait(main_task, "test_basics_repeated_tasks")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_report_example(flyte_client):
"""Test the basics.report_example with Flyte reports."""
from examples.basics.report_example import main
await _run_and_wait(main, "test_basics_report_example")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_hello_polyglot(flyte_client):
"""Test the basics.hello_polyglot example with external package."""
from examples.basics.hello_polyglot import main
await _run_and_wait(main, "test_basics_hello_polyglot", letter="e")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_overwrite_existing_file(flyte_client):
"""Test the basics.overwrite_existing_file example."""
from examples.basics.overwrite_existing_file import main
await _run_and_wait(main, "test_basics_overwrite_existing_file")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_basics_offloaded_type_basic_usage(flyte_client):
"""Test the basics.offloaded_type_basic_usage example."""
from examples.basics.offloaded_type_basic_usage import main
await _run_and_wait(main, "test_basics_offloaded_type_basic_usage")
# =============================================================================
# BASICS - TYPES
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_types_simple_types(flyte_client):
"""Test the basics.types.simple_types example."""
from examples.basics.types.simple_types import main
await _run_and_wait(
main,
"test_types_simple_types",
str="World",
int=42,
float=3.14,
bool=True,
start_time=datetime.now(),
duration=timedelta(hours=1),
)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_types_dataclass_types(flyte_client):
"""Test the basics.types.dataclass_types example with complex dataclass."""
from examples.basics.types.dataclass_types import ComplexData, NestedData, main
nested1 = NestedData(name="first", value=10, score=95.5)
nested2 = NestedData(name="second", value=20, score=87.3)
complex_data = ComplexData(
str_field="Hello World!",
int_field=42,
float_field=3.14,
bool_field=True,
start_time=datetime.now(),
duration=timedelta(hours=1),
string_list=["hello", "world"],
int_list=[1, 2, 3],
float_list=[1.1, 2.2],
bool_list=[True, False],
nested=nested1,
nested_list=[nested1, nested2],
optional_str="optional",
optional_int=99,
)
await _run_and_wait(main, "test_types_dataclass_types", data=complex_data)
# =============================================================================
# ADVANCED
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_display_names(flyte_client):
"""Test the advanced.display_names example with short names."""
from examples.advanced.display_names import main
await _run_and_wait(main, "test_advanced_display_names")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_custom_context(flyte_client):
"""Test the advanced.custom_context example."""
from examples.advanced.custom_context import main
await _run_and_wait(main, "test_advanced_custom_context", x=10)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_cancel_tasks(flyte_client):
"""Test the advanced.cancel_tasks example with task cancellation."""
from examples.advanced.cancel_tasks import main
await _run_and_wait(main, "test_advanced_cancel_tasks", n=3, f=2.0)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_leaky_coroutines(flyte_client):
"""Test the advanced.leaky_coroutines example."""
from examples.advanced.leaky_coroutines import main
await _run_and_wait(main, "test_advanced_leaky_coroutines", seconds=5)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_local_tasks(flyte_client):
"""Test the advanced.local_tasks example with traces."""
from examples.advanced.local_tasks import parallel_main_no_io
await _run_and_wait(parallel_main_no_io, "test_advanced_local_tasks", q="hello")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_hash_root_action(flyte_client):
"""Content-based caching must work when the cached task is the run's root action.
A sub-action's cache key is computed by the controller, which substitutes `Literal.hash`
for the literal's contents; a root action's key is derived from the offloaded inputs, which
reference the upload URI. Each `flyte.run` uploads to a fresh URI, so this only passes if
the content hash — not the URI — drives the key.
"""
from examples.advanced.hash_root_action import build_input, main
results = []
for i in (1, 2):
# Rebuilt each time, so run 2 uploads identical bytes to a brand-new URI.
run = await flyte.with_runcontext(log_level=logging.DEBUG).run.aio(main, df=build_input())
print(f"\n[test_advanced_hash_root_action] Run {i}: {run.url}")
run.wait()
detail = await run.action.details()
if detail.error_info:
raise RuntimeError(f"Run {i} failed with error: {detail.error_info.message}")
results.append(run.outputs()[0])
# The task embeds a fresh random number on every real execution, so identical outputs
# mean run 2 was served from run 1's cache entry.
assert results[0] == results[1], f"root action cache miss across a new upload URI: {results[0]!r} != {results[1]!r}"
print(" Cache hit across a new upload URI\n")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_multi_loops(flyte_client):
"""Test the advanced.multi_loops example with memory retries."""
from examples.advanced.multi_loops import main
await _run_and_wait(main, "test_advanced_multi_loops", n=2)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_advanced_udfs(flyte_client):
"""Test the advanced.udfs example with user-defined functions."""
from examples.advanced.udfs import main
await _run_and_wait(main, "test_advanced_udfs")
# =============================================================================
# ML
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_ml_model_training(flyte_client):
"""Test the ml.model_training example with full ML pipeline."""
from examples.ml.model_training import main
await _run_and_wait(main, "test_ml_model_training")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_ml_rfe(flyte_client):
"""Test the ml.rfe (recursive feature elimination) example."""
from examples.ml.rfe import rfe
await _run_and_wait(rfe, "test_ml_rfe")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_ml_distributed_random_forest(flyte_client):
"""Test the ml.distributed_random_forest example."""
from examples.ml.distributed_random_forest import main
await _run_and_wait(main, "test_ml_distributed_random_forest", n_estimators=4)
# =============================================================================
# REPORTS
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_reports_streaming_reports(flyte_client):
"""Test the reports.streaming_reports example with shorter parameters."""
from examples.reports.streaming_reports import training_loss_visualization
await _run_and_wait(training_loss_visualization, "test_reports_streaming_reports", epochs=5)
# =============================================================================
# STREAMING
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_streaming_basic_as_completed(flyte_client):
"""Test the streaming.basic_as_completed example."""
from examples.streaming.basic_as_completed import streaming_reduce_processing
await _run_and_wait(streaming_reduce_processing, "test_streaming_basic_as_completed")
# =============================================================================
# SYNC
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_sync_async_in_sync(flyte_client):
"""Test the sync.async_in_sync example."""
from examples.sync.async_in_sync import call_async
await _run_and_wait(call_async, "test_sync_async_in_sync")
# =============================================================================
# REUSE
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_reuse_reusable(flyte_client):
"""Test the reuse.reusable example with reuse policy."""
from examples.reuse.reusable import main
await _run_and_wait(main, "test_reuse_reusable", n=10)
# =============================================================================
# CACHING
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_caching_content_based_caching(flyte_client):
"""Test the caching.content_based_caching example."""
from examples.caching.content_based_caching import demo_cache_behavior
await _run_and_wait(demo_cache_behavior, "test_caching_content_based_caching")
# =============================================================================
# GENAI
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_genai_hello_agent(flyte_client):
"""Test the genai.hello_agent example with simple agent pattern."""
from examples.genai.hello_agent import ResearchState, lead_agent
state = ResearchState(query="test query")
await _run_and_wait(lead_agent, "test_genai_hello_agent", state=state, num_subagents=2)
# =============================================================================
# DATA PROCESSING
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_data_processing_deltalake(flyte_client):
"""Test the data_processing.deltalake_example with smaller dataset."""
from examples.data_processing.deltalake_example import main
await _run_and_wait(main, "test_data_processing_deltalake", rows=100)
# =============================================================================
# PLUGINS (existing tests)
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_spark(flyte_client):
"""Test the Spark plugin example."""
from examples.plugins.spark_example import hello_spark_nested
await _run_and_wait(hello_spark_nested, "test_spark")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_ray(flyte_client):
"""Test the Ray plugin example."""
from examples.plugins.ray_example import hello_ray_nested
await _run_and_wait(hello_ray_nested, "test_ray")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_dask(flyte_client):
"""Test the Dask plugin example."""
from examples.plugins.dask_example import hello_dask_nested
await _run_and_wait(hello_dask_nested, "test_dask")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_pytorch(flyte_client):
"""Test the PyTorch plugin example."""
from examples.plugins.torch_example import torch_distributed_train
await _run_and_wait(torch_distributed_train, "test_pytorch", epochs=1)
# =============================================================================
# CLUSTERED (JOBSETS)
# =============================================================================
@pytest.mark.integration
@pytest.mark.asyncio
async def test_clustered_failure_cascade(flyte_client):
"""Test the clustered.failure_cascade example: whole-set restart + checkpoint resume on CPU/gloo."""
from examples.clustered.failure_cascade import train_with_crash
await _run_and_wait(train_with_crash, "test_clustered_failure_cascade")
@pytest.mark.integration
@pytest.mark.asyncio
async def test_clustered_jax_allgather(flyte_client):
"""Test the clustered.jax_allgather example: JaxRun runtime, one JAX process per pod, CPU all-gather."""
from examples.clustered.jax_allgather import allgather_ranks
await _run_and_wait(allgather_ranks, "test_clustered_jax_allgather")
# =============================================================================
# APPS (deploy-based tests)
# =============================================================================
@pytest.mark.integration
@pytest.mark.apps
@pytest.mark.asyncio
async def test_apps_basic_app(flyte_client):
"""Test the apps.basic_app example with Streamlit."""
from examples.apps.basic_app import app_env
await _deploy_and_verify(app_env, "test_apps_basic_app")
@pytest.mark.integration
@pytest.mark.apps
@pytest.mark.asyncio
async def test_apps_single_script_fastapi(flyte_client):
"""Test the apps.single_script_fastapi example."""
from examples.apps.single_script_fastapi import env
await _deploy_and_verify(env, "test_apps_single_script_fastapi")
# =============================================================================
# GPU TESTS
# =============================================================================
@pytest.mark.integration
@pytest.mark.gpu
@pytest.mark.asyncio
async def test_accelerators_gpu(flyte_client):
"""Test GPU accelerator example."""
from examples.accelerators.gpu import main
await _run_and_wait(main, "test_accelerators_gpu")
@pytest.mark.integration
@pytest.mark.gpu
@pytest.mark.asyncio
async def test_genai_vllm_app(flyte_client):
"""Test vLLM app deployment."""
from examples.genai.vllm.vllm_app import vllm_app
await _deploy_and_verify(vllm_app, "test_genai_vllm_app")
@pytest.mark.integration
@pytest.mark.gpu
@pytest.mark.asyncio
async def test_genai_sglang_app(flyte_client):
"""Test SGLang app deployment."""
from examples.genai.sglang.sglang_app import sglang_app
await _deploy_and_verify(sglang_app, "test_genai_sglang_app")
# =============================================================================
# EXTERNAL SERVICE TESTS (skipped - require backend connector configuration)
# =============================================================================
@pytest.mark.integration
@pytest.mark.external
@pytest.mark.skip(reason="Requires BigQuery connector configured in Union backend")
@pytest.mark.asyncio
async def test_connectors_bigquery(flyte_client):
"""Test BigQuery connector."""
from examples.connectors.bigquery_example import bigquery_task
await _run_and_wait(bigquery_task, "test_connectors_bigquery")
@pytest.mark.integration
@pytest.mark.external
@pytest.mark.skip(reason="Requires Databricks connector configured in Union backend")
@pytest.mark.asyncio
async def test_connectors_databricks(flyte_client):
"""Test Databricks connector."""
from examples.connectors.databricks_example import hello_databricks_nested
await _run_and_wait(hello_databricks_nested, "test_connectors_databricks")
@pytest.mark.integration
@pytest.mark.secrets
@pytest.mark.skip(reason="Requires W&B API key configured as secret in Union backend")
@pytest.mark.asyncio
async def test_context_wandb(flyte_client):
"""Test W&B context."""
from examples.context.wandb_context import main
await _run_and_wait(main, "test_context_wandb")
# =============================================================================
# STRESS TESTS
# =============================================================================
@pytest.mark.integration
@pytest.mark.stress
@pytest.mark.asyncio
async def test_stress_large_fanout(flyte_client):
"""Test large fanout stress test."""
from examples.stress.large_fanout import main
await _run_and_wait(main, "test_stress_large_fanout")
@pytest.mark.integration
@pytest.mark.stress
@pytest.mark.asyncio
async def test_stress_runs_per_second(flyte_client):
"""Test runs-per-second stress test."""
from examples.stress.runs_per_second import main
await _run_and_wait(main, "test_stress_runs_per_second")
@pytest.mark.integration
@pytest.mark.stress
@pytest.mark.asyncio
async def test_stress_large_file_io(flyte_client):
"""Test large file I/O stress test."""
from examples.stress.large_file_io import main
await _run_and_wait(main, "test_stress_large_file_io")
@pytest.mark.integration
@pytest.mark.stress
@pytest.mark.asyncio
async def test_stress_fanout_concurrency(flyte_client):
"""Test fanout concurrency stress test."""
from examples.stress.fanout_concurrency import reuse_concurrency
await _run_and_wait(reuse_concurrency, "test_stress_fanout_concurrency")