[Groonga-commit] groonga/grnci at 463aab9 [master] Add tests for DB.IOFlush.

Back to archive index

Susumu Yata null+****@clear*****
Thu Sep 14 14:50:05 JST 2017


Susumu Yata	2017-09-14 14:50:05 +0900 (Thu, 14 Sep 2017)

  New Revision: 463aab9d8329276040faaa1f987abb5e24ea4dfa
  https://github.com/groonga/grnci/commit/463aab9d8329276040faaa1f987abb5e24ea4dfa

  Message:
    Add tests for DB.IOFlush.
    
    Ref: #39

  Modified files:
    v2/libgrn/db_test.go

  Modified: v2/libgrn/db_test.go (+20 -0)
===================================================================
--- v2/libgrn/db_test.go    2017-09-14 14:47:30 +0900 (d42869d)
+++ v2/libgrn/db_test.go    2017-09-14 14:50:05 +0900 (e148a2b)
@@ -698,6 +698,26 @@ load --table Tbl
 	}
 }
 
+func TestDBIOFlush(t *testing.T) {
+	db, dir := makeDB(t)
+	defer removeDB(db, dir)
+
+	if err := db.IOFlush(nil); err != nil {
+		t.Fatalf("db.IOFlush failed: %v", err)
+	}
+}
+
+func TestDBIOFlushInvalidTargetName(t *testing.T) {
+	db, dir := makeDB(t)
+	defer removeDB(db, dir)
+
+	options := grnci.NewDBIOFlushOptions()
+	options.TargetName = "no_such_target"
+	if err := db.IOFlush(options); err == nil {
+		t.Fatalf("db.IOFlush wrongly succeeded")
+	}
+}
+
 // func TestDBLoad(t *testing.T) {
 // 	client, err := NewHTTPClient("", nil)
 // 	if err != nil {
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20170914/06e4149b/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index