(path string, needle string, timeout time.Duration)
| 514 | } |
| 515 | |
| 516 | func waitForFileContent(path string, needle string, timeout time.Duration) error { |
| 517 | deadline := time.Now().Add(timeout) |
| 518 | for time.Now().Before(deadline) { |
| 519 | content, err := os.ReadFile(path) |
| 520 | if err == nil && strings.Contains(string(content), needle) { |
| 521 | return nil |
| 522 | } |
| 523 | time.Sleep(50 * time.Millisecond) |
| 524 | } |
| 525 | return fmt.Errorf("file %s did not contain %q", path, needle) |
| 526 | } |
| 527 | |
| 528 | // TestSessionFSHandlerOperations mirrors the C# Should_Map_All_SessionFS_Handler_Operations test. |
| 529 | // It exercises every operation on testSessionFSHandler directly to ensure the test helper |
no test coverage detected
searching dependent graphs…