Commit 006249c
authored
feat: implement container pooling and fix transport error handling (#551)
* feat: implement container pooling system for device emulation
* fix: address CodeRabbit review comments
- Fix YAML linting issues in GitHub workflow files
- Remove trailing spaces in ci-ts.yaml
- Add missing newlines at end of YAML files
- Fix typo: settingsNavnavLeftButton → settingsNavLeftButton
- Organize imports in containerPool.ts (external packages first)
- Remove unused model variable in cleanup() method
- Apply automated code formatting improvements
* fix: address additional CodeRabbit review comments
- Fix missing parentheses in tests/minapp/index.ts toString() call
- Add error handling to gRPC exchange promise chain
- Remove async modifier from globalsetup.ts (no await needed)
- Add race condition protection for pool initialization
- Document DEV_CERT_PRIVATE_KEY as development-only test key
* fix: resolve remaining CI issues and CodeRabbit comments
- Fix trailing spaces in .github/dependabot.yml
- Add missing await to async operations in tests/pullImageKillOld.ts
- Wrap async calls in IIFE to prevent CI hanging on cleanup
This should resolve the hanging CI build and address the remaining
CodeRabbit linting issues.
* fix: handle transport errors to fail fast instead of timing out
- Add error tracking in transport layer via proxy interceptor
- Create errors.ts with APDU status codes and error handling utilities
- Propagate critical transport errors in waitUntilScreenIs, waitUntilScreenIsNot, and waitForText
- Update getEvents to check for critical transport errors before making requests
- Add comprehensive tests to verify fast-fail behavior
Previously, when errors like 0x6984 (INVALID_DATA) or 0x6E00 (CLA_NOT_SUPPORTED) occurred,
Zemu would continue waiting for timeouts instead of failing immediately. Now these errors
are detected and cause immediate failure with clear error messages.
Fixes issue where transport errors were absorbed causing unnecessary timeout delays.
* fix: update error handling test to expect correct error code
The test was expecting 0x6984 (INVALID_DATA) but invalid CLA (0xFF) actually
triggers 0x6E00 (CLA_NOT_SUPPORTED) which is the correct behavior.
* fix: resolve linter issues
- Remove unused imports in test files
- Fix import organization in Zemu.ts
- Fix formatting (newlines at end of files)
- Apply Biome linter rules
All tests passing after linter fixes.1 parent 98e687d commit 006249c
18 files changed
Lines changed: 1151 additions & 79 deletions
File tree
- .github
- workflows
- .vscode
- src
- grpc
- tests
- minapp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
44 | 41 | | |
45 | | - | |
46 | 42 | | |
47 | 43 | | |
48 | | - | |
49 | 44 | | |
50 | 45 | | |
51 | 46 | | |
52 | | - | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
15 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
0 commit comments