Skip to content

Commit b1e73de

Browse files
committed
tests: Change instancetype test from u1.nano to u1.micro
The test hangs in GitHub Actions CI with u1.nano (512MB RAM) but passes locally. Since no code changed between Feb 5 (passing) and Feb 6 (hanging), this indicates a GHA environment change. Increase from u1.nano (512MB) to u1.micro (1GB) to provide more headroom in CI environments. The test still validates instancetype functionality. Signed-off-by: gursewak1997 <gursmangat@gmail.com>
1 parent 34527bf commit b1e73de

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

crates/integration-tests/src/tests/run_ephemeral.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,24 +171,24 @@ fn test_run_ephemeral_with_instancetype() -> Result<()> {
171171
let bck = get_bck_command()?;
172172
let image = get_test_image();
173173
let label = INTEGRATION_TEST_LABEL;
174-
// Test u1.nano: 1 vCPU, 512 MiB memory
174+
// Test u1.micro: 1 vCPU, 1 GiB memory (changed from u1.nano due to CI hangs with 512MB)
175175
// Calculate physical memory from /sys/firmware/memmap (System RAM regions)
176176
let script = "/bin/sh -c 'echo CPUs:$(grep -c ^processor /proc/cpuinfo); total=0; for dir in /sys/firmware/memmap/*; do type=$(cat \"$dir/type\" 2>/dev/null); if [ \"$type\" = \"System RAM\" ]; then start=$(cat \"$dir/start\"); end=$(cat \"$dir/end\"); start_dec=$((start)); end_dec=$((end)); size=$((end_dec - start_dec + 1)); total=$((total + size)); fi; done; total_kb=$((total / 1024)); echo PhysicalMemKB:$total_kb'";
177177

178178
let stdout = cmd!(
179179
sh,
180-
"{bck} ephemeral run --rm --label {label} --itype u1.nano --execute {script} {image}"
180+
"{bck} ephemeral run --rm --label {label} --itype u1.micro --execute {script} {image}"
181181
)
182182
.read()?;
183183

184184
// Verify vCPUs (should be 1)
185185
assert!(
186186
stdout.contains("CPUs:1"),
187-
"Expected 1 vCPU for u1.nano, output: {}",
187+
"Expected 1 vCPU for u1.micro, output: {}",
188188
stdout
189189
);
190190

191-
// Verify physical memory (should be exactly 512 MiB = 524288 kB)
191+
// Verify physical memory (should be exactly 1 GiB = 1048576 kB)
192192
let mem_line = stdout
193193
.lines()
194194
.find(|line| line.contains("PhysicalMemKB:"))
@@ -202,10 +202,10 @@ fn test_run_ephemeral_with_instancetype() -> Result<()> {
202202
.parse()
203203
.expect("Could not parse PhysicalMemKB as number");
204204

205-
// Physical memory should be close to 512 MiB = 524288 kB
205+
// Physical memory should be close to 1 GiB = 1048576 kB
206206
// QEMU reserves small memory regions (BIOS, VGA, ACPI, etc.) so actual may be slightly less
207207
// Allow 1% tolerance to account for hypervisor overhead
208-
let expected_kb = 512 * 1024;
208+
let expected_kb = 1024 * 1024;
209209
let tolerance_kb = expected_kb / 100; // 1% tolerance
210210
let diff = if mem_kb > expected_kb {
211211
mem_kb - expected_kb
@@ -215,7 +215,7 @@ fn test_run_ephemeral_with_instancetype() -> Result<()> {
215215

216216
assert!(
217217
diff <= tolerance_kb,
218-
"Expected physical memory ~{} kB for u1.nano, got {} kB (diff: {} kB, max allowed: {} kB [1%])",
218+
"Expected physical memory ~{} kB for u1.micro, got {} kB (diff: {} kB, max allowed: {} kB [1%])",
219219
expected_kb, mem_kb, diff, tolerance_kb
220220
);
221221

0 commit comments

Comments
 (0)