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

Function test_large_file

atomic-repository/tests/state_based_diff_test.rs:437–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected