You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2015/10/31 22:02:49 UTC
[12/20] lucy git commit: Test Go bindings for LockFactory.
Test Go bindings for LockFactory.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/a7f6c9f4
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/a7f6c9f4
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/a7f6c9f4
Branch: refs/heads/LUCY-282-test-index-go-pt1
Commit: a7f6c9f4f775f6378b216ba093eb5f3b1e3bc285
Parents: bda80a7
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Oct 27 19:37:08 2015 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Oct 27 19:37:08 2015 -0700
----------------------------------------------------------------------
go/lucy/store_test.go | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/a7f6c9f4/go/lucy/store_test.go
----------------------------------------------------------------------
diff --git a/go/lucy/store_test.go b/go/lucy/store_test.go
index fb2fdc7..29ed837 100644
--- a/go/lucy/store_test.go
+++ b/go/lucy/store_test.go
@@ -685,3 +685,16 @@ func TestSharedLockAll(t *testing.T) {
}
runLockCommonTests(t, makeLock)
}
+
+func TestLockFactoryAll(t *testing.T) {
+ folder := NewRAMFolder("")
+ factory := NewLockFactory(folder, "dev.example.com")
+ lock := factory.MakeLock("write", 10, 42)
+ if _, ok := lock.(Lock); !ok {
+ t.Errorf("MakeLock")
+ }
+ shlock := factory.MakeSharedLock("read", 10, 42)
+ if _, ok := shlock.(SharedLock); !ok {
+ t.Errorf("MakeSharedLock")
+ }
+}