Skip to content

Commit

Permalink
check for nils in log processor call (#13940)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel authored Jul 29, 2024
1 parent 27d9c71 commit ca6e1c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration-tests/docker/test_env/test_env_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
// new logs can be added to the log stream, so parallel processing would get stuck on waiting for it to be unlocked
LogScanningLoop:
for i := 0; i < b.clNodesCount; i++ {
if b == nil || b.te == nil || b.te.ClCluster == nil || b.te.ClCluster.Nodes == nil || b.te.ClCluster.Nodes[i] == nil || len(b.te.ClCluster.Nodes)-1 < i {
continue
}
// ignore count return, because we are only interested in the error
_, err := logProcessor.ProcessContainerLogs(b.te.ClCluster.Nodes[i].ContainerName, processFn)
if err != nil && !strings.Contains(err.Error(), testreporters.MultipleLogsAtLogLevelErr) && !strings.Contains(err.Error(), testreporters.OneLogAtLogLevelErr) {
Expand Down

0 comments on commit ca6e1c2

Please sign in to comment.