Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
74f8ffcd
Commit
74f8ffcd
authored
Jan 03, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b129267b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
go/internal/xtracing/tracetest/chan.go
go/internal/xtracing/tracetest/chan.go
+2
-1
go/internal/xtracing/tracetest/tracetest.go
go/internal/xtracing/tracetest/tracetest.go
+8
-4
No files found.
go/internal/xtracing/tracetest/chan.go
View file @
74f8ffcd
...
...
@@ -19,6 +19,7 @@
package
tracetest
// synchronous channels.
// XXX move back to tracetest.go ? -> likely yes
import
(
"errors"
...
...
@@ -81,7 +82,7 @@ func (ch *_chan) Close() {
//
// The consumer, after dealing with the message, must send back an ack.
func
(
ch
*
_chan
)
Recv
()
*
_Msg
{
msg
:=
<-
ch
.
msgq
msg
:=
<-
ch
.
msgq
// XXX detect deadlock
return
msg
}
...
...
go/internal/xtracing/tracetest/tracetest.go
View file @
74f8ffcd
...
...
@@ -160,7 +160,7 @@ func (t *T) SetEventRouter(routeEvent func(event interface{}) (stream string)) {
//
// The sequential process of the test system where event originated should be
// paused until RxEvent returns. This requirement can be usually met via
// inserting t.RxEvent() call into the code th
e
produces the event.
// inserting t.RxEvent() call into the code th
at
produces the event.
//
// XXX naming; NewEvent? IncomingEvent? OnEvent?
func
(
t
*
T
)
RxEvent
(
event
interface
{})
{
...
...
@@ -223,9 +223,13 @@ func (t *T) Expect(stream string, eventOK interface{}) {
msg
.
Ack
()
}
// XXX ExpectNoACK
// XXX Recv
// XXX Select? (e.g. Select("a", "b") to fetch from either "a" or "b")
// TODO ExpectNoACK? (then it would be possible to receive events from 2
// streams; have those 2 processes paused and inspect their state. After
// inspection unpause both)
// TODO Recv? (to receive an event for which we don't know type or value yet)
// TODO Select? (e.g. Select("a", "b") to fetch from either "a" or "b")
// expect1 receives next event on stream and verifies it to be equal to eventOK (both type and value).
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment