Commit 754bd47
fix(cdk): optimize test suite via shared CDK template synthesis (#195)
* perf(cdk): share CDK templates in task-api tests for 61% faster suite
Refactors task-api.test.ts to synthesize CDK templates once per describe
block via beforeAll instead of per-test. Reduces CDK synth calls from
41 to 11 while preserving all 40 test assertions unchanged.
Before: 371s total Jest / task-api.test 370s wall clock
After: 145s total Jest / task-api.test 89s wall clock
Closes #194
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* perf(cdk): share CDK templates in orchestrator and ECS cluster tests
Applies the same beforeAll template-sharing pattern to:
- task-orchestrator.test.ts: 33 → 12 synths (4 shared + 8 unique)
- ecs-agent-cluster.test.ts: 10 → 2 synths (1 shared + 1 unique)
Combined with task-api.test.ts, total CDK synths across the three
heaviest suites drop from 84 to 25 (70% fewer).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: bgagent <345885+scottschreckengaust@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dc480dd commit 754bd47
3 files changed
Lines changed: 149 additions & 236 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | | - | |
71 | | - | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
82 | | - | |
83 | | - | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | | - | |
96 | | - | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
111 | | - | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
115 | | - | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| |||
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
155 | | - | |
156 | | - | |
| 154 | + | |
157 | 155 | | |
158 | 156 | | |
159 | 157 | | |
| |||
170 | 168 | | |
171 | 169 | | |
172 | 170 | | |
173 | | - | |
174 | | - | |
| 171 | + | |
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
| |||
0 commit comments