"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "nsqd/nsqd_test.go" between
nsq-1.2.0.tar.gz and nsq-1.2.1.tar.gz

About: nsq is a realtime distributed and and decentralized messaging platform.

nsqd_test.go  (nsq-1.2.0):nsqd_test.go  (nsq-1.2.1)
skipping to change at line 181 skipping to change at line 181
exitChan := make(chan int) exitChan := make(chan int)
go func() { go func() {
<-exitChan <-exitChan
nsqd.Exit() nsqd.Exit()
doneExitChan <- 1 doneExitChan <- 1
}() }()
body := []byte("an_ephemeral_message") body := []byte("an_ephemeral_message")
topic := nsqd.GetTopic(topicName) topic := nsqd.GetTopic(topicName)
ephemeralChannel := topic.GetChannel("ch1#ephemeral") ephemeralChannel := topic.GetChannel("ch1#ephemeral")
client := newClientV2(0, nil, &context{nsqd}) client := newClientV2(0, nil, nsqd)
err := ephemeralChannel.AddClient(client.ID, client) err := ephemeralChannel.AddClient(client.ID, client)
test.Equal(t, err, nil) test.Equal(t, err, nil)
msg := NewMessage(topic.GenerateID(), body) msg := NewMessage(topic.GenerateID(), body)
topic.PutMessage(msg) topic.PutMessage(msg)
msg = <-ephemeralChannel.memoryMsgChan msg = <-ephemeralChannel.memoryMsgChan
test.Equal(t, body, msg.Body) test.Equal(t, body, msg.Body)
ephemeralChannel.RemoveClient(client.ID) ephemeralChannel.RemoveClient(client.ID)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)