|
1 | 1 | import os |
| 2 | +from uuid import uuid4 |
2 | 3 |
|
3 | 4 | import pytest |
| 5 | +from sqlalchemy import event |
4 | 6 |
|
5 | 7 | from galaxy import model |
6 | 8 | from galaxy.exceptions import RequestParameterInvalidException |
|
15 | 17 | ) |
16 | 18 |
|
17 | 19 | default_password = "123456" |
18 | | -_user_counter = 0 |
19 | 20 |
|
20 | 21 |
|
21 | 22 | def _next_user_data(): |
22 | | - global _user_counter |
23 | | - _user_counter += 1 |
| 23 | + suffix = uuid4().hex[:8] |
24 | 24 | return dict( |
25 | | - email=f"graphuser{_user_counter}@test.test", |
26 | | - username=f"graphuser{_user_counter}", |
| 25 | + email=f"graphuser{suffix}@test.test", |
| 26 | + username=f"graphuser{suffix}", |
27 | 27 | password=default_password, |
28 | 28 | ) |
29 | 29 |
|
@@ -589,19 +589,6 @@ def test_deleted_items_with_include_deleted(self): |
589 | 589 | graph = builder.build() |
590 | 590 | assert len(graph.nodes) == 1 |
591 | 591 |
|
592 | | - def test_determinism_identical_requests(self): |
593 | | - """Identical requests produce identical output.""" |
594 | | - history, _ = self._create_history() |
595 | | - self._build_linear_chain(history, length=3) |
596 | | - |
597 | | - graph1 = self._build_graph(history) |
598 | | - graph2 = self._build_graph(history) |
599 | | - |
600 | | - assert [n.id for n in graph1.nodes] == [n.id for n in graph2.nodes] |
601 | | - assert [(e.source, e.target, e.type) for e in graph1.edges] == [ |
602 | | - (e.source, e.target, e.type) for e in graph2.edges |
603 | | - ] |
604 | | - |
605 | 592 | def test_expanding_limit_generally_additive(self): |
606 | 593 | """Expanding limit is generally additive for standalone datasets. |
607 | 594 |
|
@@ -996,8 +983,6 @@ def test_n2_ambiguous_hdca_producer_has_node_but_no_edge(self): |
996 | 983 | This is the deliberately conservative behavior — we do not pick |
997 | 984 | an arbitrary winner at the response level. |
998 | 985 | """ |
999 | | - from galaxy.managers.history_graph import HistoryGraphBuilder |
1000 | | - |
1001 | 986 | history, _ = self._create_history() |
1002 | 987 | in_hda = self._create_hda(history, name="input") |
1003 | 988 |
|
@@ -1059,8 +1044,6 @@ def test_seed_filter_issues_no_extra_queries(self): |
1059 | 1044 | subset of the unseeded result (proving it's a pure post-filter, |
1060 | 1045 | not a different construction path). |
1061 | 1046 | """ |
1062 | | - from sqlalchemy import event |
1063 | | - |
1064 | 1047 | history, _ = self._create_history() |
1065 | 1048 | # Build a small chain so there's something to filter. |
1066 | 1049 | chain = self._build_linear_chain(history, length=3) |
@@ -1177,10 +1160,10 @@ def test_stability_new_items_shift_recent_window(self): |
1177 | 1160 |
|
1178 | 1161 | # ── Scalability / Boundedness Tests ── |
1179 | 1162 |
|
1180 | | -GRAPH_SCALE_HISTORY_SIZE = int(os.environ.get("GRAPH_SCALE_HISTORY_SIZE", 500)) |
1181 | | -GRAPH_SCALE_CHAIN_LENGTH = int(os.environ.get("GRAPH_SCALE_CHAIN_LENGTH", 100)) |
1182 | | -GRAPH_SCALE_COLLECTION_COUNT = int(os.environ.get("GRAPH_SCALE_COLLECTION_COUNT", 10)) |
1183 | | -GRAPH_SCALE_COLLECTION_SIZE = int(os.environ.get("GRAPH_SCALE_COLLECTION_SIZE", 50)) |
| 1163 | +GRAPH_SCALE_HISTORY_SIZE = int(os.environ.get("GRAPH_SCALE_HISTORY_SIZE", 250)) |
| 1164 | +GRAPH_SCALE_CHAIN_LENGTH = int(os.environ.get("GRAPH_SCALE_CHAIN_LENGTH", 60)) |
| 1165 | +GRAPH_SCALE_COLLECTION_COUNT = int(os.environ.get("GRAPH_SCALE_COLLECTION_COUNT", 5)) |
| 1166 | +GRAPH_SCALE_COLLECTION_SIZE = int(os.environ.get("GRAPH_SCALE_COLLECTION_SIZE", 20)) |
1184 | 1167 |
|
1185 | 1168 |
|
1186 | 1169 | class TestHistoryGraphBuilderBoundedness(BaseTestCase, CreatesCollectionsMixin): |
|
0 commit comments