Skip to content

Commit ca29743

Browse files
committed
feat: run tests with data race condition to check for any deadlocks
1 parent 5e7c199 commit ca29743

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docker-compose.test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ services:
88
# The tests might require permissions to write to coverage out files.
99
# If you encounter issues with permissions, you can try running the container as root.
1010
user: root
11-
image: cimg/go:1.22.5
11+
image: cimg/go:1.24.3
1212
working_dir: /etc/ocpp-go
1313
volumes:
1414
- .:/etc/ocpp-go:rw
1515
command:
1616
- /bin/bash
1717
- -c
1818
- |
19-
go test -v -covermode=count -coverprofile=coverage.out ./ocppj
20-
go test -v -covermode=count -coverprofile=ocpp16.out -coverpkg=github.com/lorenzodonini/ocpp-go/ocpp1.6/... github.com/lorenzodonini/ocpp-go/ocpp1.6_test
21-
go test -v -covermode=count -coverprofile=ocpp201.out -coverpkg=github.com/lorenzodonini/ocpp-go/ocpp2.0.1/... github.com/lorenzodonini/ocpp-go/ocpp2.0.1_test
19+
go test -race -v -covermode=atomic -coverprofile=coverage.out ./ocppj
20+
go test -race -v -covermode=atomic -coverprofile=ocpp16.out -coverpkg=github.com/lorenzodonini/ocpp-go/ocpp1.6/... github.com/lorenzodonini/ocpp-go/ocpp1.6_test
21+
go test -race -v -covermode=atomic -coverprofile=ocpp201.out -coverpkg=github.com/lorenzodonini/ocpp-go/ocpp2.0.1/... github.com/lorenzodonini/ocpp-go/ocpp2.0.1_test
2222
sed '1d;$d' ocpp16.out >> coverage.out
2323
sed '1d;$d' ocpp201.out >> coverage.out
2424
2525
integration_test:
26-
image: cimg/go:1.22.5
26+
image: cimg/go:1.24.3
2727
# The tests might require permissions to write to coverage out files.
2828
# If you encounter issues with permissions, you can try running the container as root.
2929
user: root
@@ -38,6 +38,6 @@ services:
3838
command:
3939
- /bin/bash
4040
- -c
41-
- go test ./ws -v -covermode=count -coverprofile=integration_coverage.out
41+
- go test -race ./ws -v -covermode=atomic -coverprofile=integration_coverage.out
4242
volumes:
4343
- .:/etc/ocpp-go:rw

0 commit comments

Comments
 (0)