MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_large_file

Function test_large_file

atomic-repository/tests/it/state_based_diff_test.rs:446–473  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

444#[test]
445#[ignore = "large-file integration case disabled pending faster default-path validation"]
446fn test_large_file() {
447 std::thread::Builder::new()
448 .name("test_large_file".to_string())
449 .stack_size(32 * 1024 * 1024)
450 .spawn(|| {
451 let (repo, _temp, repo_path) = create_test_repo();
452
453 // Keep the default integration case large enough to exercise the
454 // file pipeline without making normal test runs benchmark-scale.
455 let large_content = "Line of content\n".repeat(5_000);
456 create_and_add_file(&repo, &repo_path, "large.txt", &large_content);
457 let hash = record_change(&repo, "Add large file");
458
459 let after = repo
460 .get_file_content_after_change("large.txt", &hash)
461 .expect("Failed to get after");
462
463 assert!(after.is_some(), "Large content should be retrievable");
464 assert_eq!(
465 String::from_utf8_lossy(&after.unwrap()),
466 large_content,
467 "Large content should match"
468 );
469 })
470 .expect("spawn test_large_file thread")
471 .join()
472 .expect("join test_large_file thread");
473}
474
475#[test]
476#[ignore = "stress/perf guardrail; run explicitly when profiling large-file behavior"]

Callers

nothing calls this directly

Calls 6

create_and_add_fileFunction · 0.85
spawnMethod · 0.80
create_test_repoFunction · 0.70
record_changeFunction · 0.70
nameMethod · 0.45

Tested by

no test coverage detected