File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/testcontainers/src/wait-strategies Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { log } from "../common";
44import { getContainerRuntimeClient } from "../container-runtime" ;
55import { BoundPorts } from "../utils/bound-ports" ;
66import { AbstractWaitStrategy } from "./wait-strategy" ;
7+ import byline from "byline" ;
78
89export type Log = string ;
910
@@ -30,8 +31,8 @@ export class LogWaitStrategy extends AbstractWaitStrategy {
3031 const stream = await client . container . logs ( container , { since : startTime ? startTime . getTime ( ) / 1000 : 0 } ) ;
3132
3233 let matches = 0 ;
33- for await ( const chunk of stream ) {
34- if ( this . matches ( chunk ) ) {
34+ for await ( const line of byline ( stream ) ) {
35+ if ( this . matches ( line ) ) {
3536 if ( ++ matches === this . times ) {
3637 return log . debug ( `Log wait strategy complete` , { containerId : container . id } ) ;
3738 }
You can’t perform that action at this time.
0 commit comments