Skip to content

Commit 5b25547

Browse files
author
xmik
committed
add more comments about issue #27 which causes tests flakiness
1 parent 5a344fe commit 5b25547

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docker_compose_driver.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ func (dc DockerComposeDriver) getDefaultContainerID(containersNames []string) st
635635
//
636636
// The output for docker-compose >2 does not show the default container. In order to have it included, we need to run `ps --all`
637637
//
638-
// Returns: container names, error
638+
// Returns: container names
639639
func (dc DockerComposeDriver) getDCContainersNames(mergedConfig Config, projectName string) []string {
640640
if projectName == "" {
641641
panic("projectName was empty")
@@ -647,6 +647,10 @@ func (dc DockerComposeDriver) getDCContainersNames(mergedConfig Config, projectN
647647
cmdInfo := cmdInfoToString(cmd, stdout, stderr, exitStatus)
648648
if strings.Contains(stderr, "No such container") {
649649
// Workaround for issue #27: do not panic but print error level log message.
650+
// This happens rarely and seems similar to
651+
// https://github.com/docker/compose/issues/9534 and
652+
// https://github.com/docker/compose/issues/10373
653+
// and this makes the tests such as test_docker_compose_run_preserves_bash_functions flaky
650654
dc.Logger.Log("error", fmt.Sprintf("Unexpected exit status:\n%s", cmdInfo))
651655
return []string{}
652656
} else {

0 commit comments

Comments
 (0)