Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ class CodeRepository {
log: prevLog,
);
case RunCodeStatus.executing:
case RunCodeStatus.finished:
final responses = await Future.wait([
_client.getRunOutput(pipelineUuid, request),
_client.getLogOutput(pipelineUuid, request)
_client.getLogOutput(pipelineUuid, request),
]);
final output = responses[0];
final log = responses[1];
Expand All @@ -147,6 +146,20 @@ class CodeRepository {
output: prevOutput + output.output,
log: prevLog + log.output,
);
case RunCodeStatus.finished:
final responses = await Future.wait([
_client.getRunOutput(pipelineUuid, request),
_client.getLogOutput(pipelineUuid, request),
_client.getRunErrorOutput(pipelineUuid, request)
]);
final output = responses[0];
final log = responses[1];
final error = responses[2];
return RunCodeResult(
status: status,
output: prevOutput + output.output + error.output,
log: prevLog + log.output,
);
default:
return RunCodeResult(status: status);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ void main() {
when(client.getCompileOutput(kPipelineUuid, kRequestMock)).thenAnswer(
(_) async => kCompileOutputResponse,
);
when(client.getRunErrorOutput(kPipelineUuid, kRequestMock)).thenAnswer(
(_) async => kRunErrorOutputResponse,
);
when(client.getLogOutput(kPipelineUuid, kRequestMock)).thenAnswer(
(_) async => kLogOutputResponse,
);
Expand All @@ -91,7 +94,7 @@ void main() {
),
RunCodeResult(
status: RunCodeStatus.finished,
output: kRunOutput,
output: kRunOutput + kRunErrorOutput,
log: kProcessingStartedText + kLogOutput,
),
]),
Expand Down Expand Up @@ -234,7 +237,7 @@ void main() {
),
RunCodeResult(
status: RunCodeStatus.finished,
output: kRunOutput * 3,
output: kRunOutput * 3 + kRunErrorOutput,
log: kProcessingStartedText + kLogOutput * 3,
),
]),
Expand Down