Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Nov 7, 2024
1 parent 8d819bb commit 62ed9da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,10 @@ func executeStreamCallAndGetReceivedServiceLogLines(
case <-time.Tick(testTimeOut):
return nil, stacktrace.NewError("Receiving stream logs in the test has reached the '%v' time out", testTimeOut)
case streamErr, isChanOpen := <-errChan:
if !isChanOpen && len(userServiceLogsByUuidChan) == 0 {
shouldReceiveStream = false
break
}
if streamErr == nil && !isChanOpen {
if !isChanOpen {
if len(userServiceLogsByUuidChan) == 0 {
shouldReceiveStream = false
}
break
}
return nil, stacktrace.Propagate(streamErr, "Receiving streaming error.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

const (
batchLogsAmount = 2
batchLogsAmount = 1
logsChanBufferSize = 300
)

Expand Down Expand Up @@ -63,8 +63,3 @@ func (sender *LogLineSender) Flush() {
sender.logLineBuffer[serviceUuid] = []LogLine{}
}
}

func (sender *LogLineSender) Close() {
sender.Flush()
close(sender.logsChan)
}

0 comments on commit 62ed9da

Please sign in to comment.