File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
CodeEditTests/Features/Tasks
CodeEdit/Features/SourceControl Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ extension SourceControlManager {
170170
171171 await setChangedFiles ( status. changedFiles + status. untrackedFiles)
172172 await refreshStatusInFileManager ( )
173+ } catch GitClient . GitClientError . notGitRepository {
174+ await setChangedFiles ( [ ] )
173175 } catch {
174176 logger. error ( " Error fetching git status: \( error) " )
175177 await setChangedFiles ( [ ] )
Original file line number Diff line number Diff line change @@ -28,22 +28,27 @@ class CEActiveTaskTests {
2828 #expect( activeTask. task == task, " Active task should be initialized with the provided CETask. " )
2929 }
3030
31- @Test ( . timeLimit ( . minutes ( 1 ) ) )
31+ @Test
3232 func testRunMethod( ) async throws {
3333 activeTask. run ( workspaceURL: nil )
34+ await waitForExpectation ( timeout: . seconds( 10 ) ) {
35+ activeTask. status == . running
36+ } onTimeout: {
37+ Issue . record ( " Task never started. \( activeTask. status) " )
38+ }
3439 activeTask. waitForExit ( )
3540
3641 await waitForExpectation {
3742 activeTask. status == . finished
3843 } onTimeout: {
39- Issue . record ( " Status never changed to finished. " )
44+ Issue . record ( " Status never changed to finished. \( activeTask . status ) " )
4045 }
4146
4247 let output = try #require( activeTask. output)
4348 #expect( output. getBufferAsString ( ) . contains ( " Testing " ) )
4449 }
4550
46- @Test ( . timeLimit ( . minutes ( 1 ) ) )
51+ @Test
4752 func testHandleProcessFinished( ) async throws {
4853 task. command = " aNon-existentCommand "
4954 activeTask. run ( workspaceURL: nil )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class TaskManagerTests {
3333 taskManager. selectedTaskID = task. id
3434 taskManager. executeActiveTask ( )
3535
36- await waitForExpectation ( timeout: . seconds( 1 ) ) {
36+ await waitForExpectation ( timeout: . seconds( 10 ) ) {
3737 self . taskManager. activeTasks [ task. id] ? . status == . finished
3838 } onTimeout: {
3939 Issue . record ( " Status never changed to finished. " )
You can’t perform that action at this time.
0 commit comments