Commit 34c9e53
authored
Stabilize interpreter selection integration tests by asserting on interpreter path, not envId (microsoft#1571)
`interpreterSelection.integration.test.ts` was asserting equality on
`envId.id` across `setEnvironment → getEnvironment` flows. That ID is
intentionally non-stable after persistence (manager may re-register with
a suffixed opaque ID), which caused CI failures despite selecting the
same interpreter.
- **Root cause**
- Tests treated `envId.id` as a stable identity across persistence
round-trips.
- For these flows, stable identity is the interpreter executable path
(`environmentPath.fsPath`).
- **Changes in this PR**
- Replaced `envId.id` equality assertions with `environmentPath.fsPath`
equality in all affected integration tests:
- `setEnvironment persists selection`
- `Project selection is independent of global` (global + project
assertions)
- `Change event includes old and new values`
- `File inherits project environment`
- `Setting same environment is idempotent`
- Updated assertion message text where needed to reflect path-based
interpreter identity.
- **Scope**
- Test-only change in
`src/test/integration/interpreterSelection.integration.test.ts`.
- No production/runtime behavior changes.
```ts
assert.strictEqual(
retrieved.environmentPath.fsPath,
envToSet.environmentPath.fsPath,
'Retrieved environment should point to the same interpreter as the one set',
);
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent b991b71 commit 34c9e53
1 file changed
Lines changed: 30 additions & 6 deletions
Lines changed: 30 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
137 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
142 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
143 | 155 | | |
144 | 156 | | |
145 | 157 | | |
| |||
177 | 189 | | |
178 | 190 | | |
179 | 191 | | |
180 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
181 | 197 | | |
182 | 198 | | |
183 | 199 | | |
| |||
209 | 225 | | |
210 | 226 | | |
211 | 227 | | |
212 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
213 | 233 | | |
214 | 234 | | |
215 | 235 | | |
| |||
261 | 281 | | |
262 | 282 | | |
263 | 283 | | |
264 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
265 | 289 | | |
266 | 290 | | |
267 | 291 | | |
| |||
0 commit comments