commit | 623bed05fee6be16c260697526083f89a6541cdf | [log] [tgz] |
---|---|---|
author | Adam Sadovsky <asadovsky@gmail.com> | Fri Oct 30 11:02:43 2015 -0700 |
committer | Adam Sadovsky <asadovsky@gmail.com> | Fri Oct 30 11:02:43 2015 -0700 |
tree | b7f8e21719ba940e0b2b8e7deb5285e4bf2f1e6a | |
parent | e6ee26c725a4379604826ba502fe9f7ad75f4ec1 [diff] |
test: swap V23InitSimple and V23Init Also: - renames the "with mounttable" version to V23InitWithMounttable - switches most tests to use the "no mounttable" version, since they weren't actually using the mounttable - adds "test.Init()" in a few places that were missing it When I run "jiri go test v.io/v23/... v.io/x/ref/..." on OS X, there are still a few warnings about accepting incoming network connections, but far fewer than before. The advantage of not including the mounttable for tests where it's not needed are: - slightly faster, cheaper tests - fewer goroutines in panic dumps Note: Matt expressed a concern that with this change, developers will be less likely to use the mount table in their tests. After giving this some thought, I don't think it's the case: - Developers who understand V23Init/V23InitWithMounttable will use whatever's appropriate. (If they really want to use endpoints, even though it's trivial to start a mount table, we can't stop them.) - Developers who don't understand V23Init/V23InitWithMounttable, and don't think about whether they should use a mount table, will just copy the behavior of existing tests, which generally use endpoints. This was the case before, and will continue to be the case. - Developers who don't understand V23Init/V23InitWithMounttable, but realize they want a mount table, previously would have either (a) started their own mount table or (b) looked at the impl of V23Init and realized it starts a mount table for them. Neither of these scenarios change with this new scheme. If anything, the new scheme is nice in that developers might by chance come across an invocation of "test.V23InitWithMounttable", realize from the name that this is what they should've been using all along in their own tests, and update those tests to use it instead of test.V23Init. (By the argument above: if we really want to have a single helper that always starts a mount table, we should name it test.V23InitWithMounttable so that developers can discover that it has this behavior even while copying code that still uses endpoints.) Change-Id: I99c7ca90c144799b472f6d1728aca58ab8128550
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.