MCPcopy Create free account
hub / github.com/github/copilot-sdk / waitForFileContent

Function waitForFileContent

go/internal/e2e/session_fs_e2e_test.go:516–526  ·  view source on GitHub ↗
(path string, needle string, timeout time.Duration)

Source from the content-addressed store, hash-verified

514}
515
516func 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

Callers 1

TestSessionFSE2EFunction · 0.85

Calls 2

ReadFileMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…