Skip to content
Snippets Groups Projects
Commit 36792e39 authored by Jake Taylor's avatar Jake Taylor
Browse files

fix tests

parent cc4813b0
No related branches found
No related tags found
3 merge requests!510Release,!220Xx 3916/restlike conn,!207WIP: Client Restructure
...@@ -19,41 +19,3 @@ func TestSingleReceiver_Callback_FailUnmarshal(t *testing.T) { ...@@ -19,41 +19,3 @@ func TestSingleReceiver_Callback_FailUnmarshal(t *testing.T) {
r.Hear(receive.Message{Payload: []byte("test")}) r.Hear(receive.Message{Payload: []byte("test")})
} }
// Test happy path
//func TestSingleReceiver_Callback(t *testing.T) {
// ep := &Endpoints{endpoints: make(map[URI]map[Method]Callback)}
// resultChan := make(chan interface{}, 1)
// cb := func(*Message) *Message {
// resultChan <- ""
// return nil
// }
// testPath := URI("test/path")
// testMethod := Get
// testMessage := &Message{
// Content: []byte("test"),
// Headers: nil,
// Method: uint32(testMethod),
// Uri: string(testPath),
// Error: "",
// }
//
// err := ep.Add(testPath, testMethod, cb)
// if err != nil {
// t.Errorf(err.Error())
// }
// receiver := singleReceiver{endpoints: ep}
//
// testPayload, err := proto.Marshal(testMessage)
// if err != nil {
// t.Errorf(err.Error())
// }
// testReq := single.BuildTestRequest(testPayload, t)
// receiver.Callback(testReq, receptionID.EphemeralIdentity{}, nil)
//
// select {
// case _ = <-resultChan:
// case <-time.After(3 * time.Second):
// t.Errorf("Test SingleReceiver timed out!")
// }
//}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment