Fills a node with key/value pairs with no flags and no expiration. Returns a list of the inserted data. Each entry represents a KV pair since keys equal their values.
(t *testing.T, n *Node, numKeys int)
| 28 | // Fills a node with key/value pairs with no flags and no expiration. Returns a list of the inserted data. Each entry |
| 29 | // represents a KV pair since keys equal their values. |
| 30 | func fillNode(t *testing.T, n *Node, numKeys int) []string { |
| 31 | var keysAndValues []string |
| 32 | for i := 0; i < numKeys; i++ { |
| 33 | d := fmt.Sprintf("%d", i) |
| 34 | keysAndValues = append(keysAndValues, d) |
| 35 | |
| 36 | if err := n.data.Set(d, []byte(d), 0, 0); err != nil { |
| 37 | t.Fatalf("Set(%v) failed: %v", d, err) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | return keysAndValues |
| 42 | } |
| 43 | |
| 44 | func TestMarkPeersDirtySingle(t *testing.T) { |
| 45 | nodes, err := connectedTestNodes(2, 2) |
no test coverage detected