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 {
170
170
171
171
await setChangedFiles ( status. changedFiles + status. untrackedFiles)
172
172
await refreshStatusInFileManager ( )
173
+ } catch GitClient . GitClientError . notGitRepository {
174
+ await setChangedFiles ( [ ] )
173
175
} catch {
174
176
logger. error ( " Error fetching git status: \( error) " )
175
177
await setChangedFiles ( [ ] )
Original file line number Diff line number Diff line change @@ -28,22 +28,27 @@ class CEActiveTaskTests {
28
28
#expect( activeTask. task == task, " Active task should be initialized with the provided CETask. " )
29
29
}
30
30
31
- @Test ( . timeLimit ( . minutes ( 1 ) ) )
31
+ @Test
32
32
func testRunMethod( ) async throws {
33
33
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
+ }
34
39
activeTask. waitForExit ( )
35
40
36
41
await waitForExpectation {
37
42
activeTask. status == . finished
38
43
} onTimeout: {
39
- Issue . record ( " Status never changed to finished. " )
44
+ Issue . record ( " Status never changed to finished. \( activeTask . status ) " )
40
45
}
41
46
42
47
let output = try #require( activeTask. output)
43
48
#expect( output. getBufferAsString ( ) . contains ( " Testing " ) )
44
49
}
45
50
46
- @Test ( . timeLimit ( . minutes ( 1 ) ) )
51
+ @Test
47
52
func testHandleProcessFinished( ) async throws {
48
53
task. command = " aNon-existentCommand "
49
54
activeTask. run ( workspaceURL: nil )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class TaskManagerTests {
33
33
taskManager. selectedTaskID = task. id
34
34
taskManager. executeActiveTask ( )
35
35
36
- await waitForExpectation ( timeout: . seconds( 1 ) ) {
36
+ await waitForExpectation ( timeout: . seconds( 10 ) ) {
37
37
self . taskManager. activeTasks [ task. id] ? . status == . finished
38
38
} onTimeout: {
39
39
Issue . record ( " Status never changed to finished. " )
You can’t perform that action at this time.
0 commit comments