github.com/yinchengtsinghua/golang-Eos-dpos-Ethereum@v0.0.0-20190121132951-92cc4225ed8e/swarm/storage/mock/rpc/rpc_test.go (about) 1 2 //此源码被清华学神尹成大魔王专业翻译分析并修改 3 //尹成QQ77025077 4 //尹成微信18510341407 5 //尹成所在QQ群721929980 6 //尹成邮箱 yinc13@mails.tsinghua.edu.cn 7 //尹成毕业于清华大学,微软区块链领域全球最有价值专家 8 //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 9 // 10 // 11 // 12 // 13 // 14 // 15 // 16 // 17 // 18 // 19 // 20 // 21 // 22 // 23 // 24 25 package rpc 26 27 import ( 28 "testing" 29 30 "github.com/ethereum/go-ethereum/rpc" 31 "github.com/ethereum/go-ethereum/swarm/storage/mock/mem" 32 "github.com/ethereum/go-ethereum/swarm/storage/mock/test" 33 ) 34 35 // 36 // 37 func TestRPCStore(t *testing.T) { 38 serverStore := mem.NewGlobalStore() 39 40 server := rpc.NewServer() 41 if err := server.RegisterName("mockStore", serverStore); err != nil { 42 t.Fatal(err) 43 } 44 45 store := NewGlobalStore(rpc.DialInProc(server)) 46 defer store.Close() 47 48 test.MockStore(t, store, 100) 49 }