Skip to content

Error when there are a lot of tests #40

@sazzle2611

Description

@sazzle2611

Hi

We use memongo in our GitLab CI pipeline to run tests before creating an image. Image is Alpine 3.21 with golang 1.24.

[memongo] [INFO]  Starting MongoDB with options &memongo.Options{ShouldUseReplica:true, Port:36343, CachePath:"", MongoVersion:"8.0.0", DownloadURL:"", MongodBin:"/usr/bin/mongod", Logger:(*log.Logger)(nil), LogLevel:0, StartupTimeout:10000000000, Auth:false}

--- FAIL: TestAddVehicle (31.78s)
    --- FAIL: TestAddVehicle/Error (30.90s)
        mongo_test.go:194: connection(localhost:36343[-85]) socket was unexpectedly closed: EOF
--- FAIL: TestUpdateVehicle (10.00s)
    --- FAIL: TestUpdateVehicle/OK (10.00s)
        --- FAIL: TestUpdateVehicle/OK/valid_data (10.00s)
panic: server selection error: context deadline exceeded, current topology: { Type: Unknown, Servers: [{ Addr: localhost:36343, Type: Unknown, Last error: dial tcp [::1]:36343: connect: connection refused }, ] } [recovered]
	panic: server selection error: context deadline exceeded, current topology: { Type: Unknown, Servers: [{ Addr: localhost:36343, Type: Unknown, Last error: dial tcp [::1]:36343: connect: connection refused }, ] }

When this error first appeared we used memongo v0.10.0 but I tried updating to v0.12.0 and there's same issue.

I commented out a lot of the tests and then it passed which is why I think it's related to that, I didn't comment out the tests that you see in the error message so it can't be related to them.

Any help on this would be greatly appreciated.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions