Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestORBSLAMDataProcess timeout #1484

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions services/slam/builtin/builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ func TestCartographerDataProcess(t *testing.T) {
}()

cancelCtx, cancelFunc := context.WithCancel(context.Background())
c := make(chan int)
c := make(chan int, 100)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increasing the channel buffer size so that we don't block writing to the channel in the test. It's possible the data process will write to the channel a few more times before the channel is closed.

slamSvc.StartDataProcess(cancelCtx, cams, camStreams, c)

<-c
Expand All @@ -698,7 +698,7 @@ func TestCartographerDataProcess(t *testing.T) {
}()

cancelCtx, cancelFunc := context.WithCancel(context.Background())
c := make(chan int)
c := make(chan int, 100)
slamSvc.StartDataProcess(cancelCtx, cams, camStreams, c)

<-c
Expand Down Expand Up @@ -764,7 +764,7 @@ func TestORBSLAMDataProcess(t *testing.T) {

cancelCtx, cancelFunc := context.WithCancel(context.Background())

c := make(chan int)
c := make(chan int, 100)
slamSvc.StartDataProcess(cancelCtx, cams, camStreams, c)

<-c
Expand All @@ -788,7 +788,7 @@ func TestORBSLAMDataProcess(t *testing.T) {
}()

cancelCtx, cancelFunc := context.WithCancel(context.Background())
c := make(chan int)
c := make(chan int, 100)
slamSvc.StartDataProcess(cancelCtx, cams, camStreams, c)

<-c
Expand Down