What to do to run test faster

76 views
Skip to first unread message

itumo...@gmail.com

unread,
Mar 16, 2017, 9:38:26 PM3/16/17
to google-appengine-go
Hello, I have use "github.com/favclip/testerato" but, slow yet.
what should  test code or settings?

vva...@gmail.com

unread,
Mar 16, 2017, 11:39:00 PM3/16/17
to google-appengine-go
Hi! I'm author of https://github.com/favclip/testerator .
I am happy that the user is here!

The reason why you have to spindown often is because the file descriptor is shorted. you have to release it.
It seems to me a bug in dev server but has not been fixed it yet.

You can relax file descriptor limitation.
When you do this dirty hack, You can raise the value of testrator.DefaultSetup.ResetThreshold.

2017年3月17日金曜日 10時38分26秒 UTC+9 anohitosan000:

Shingo Ishimura

unread,
Mar 17, 2017, 12:54:10 AM3/17/17
to google-appengine-go
You may not be running TestMain() first.
You need to pool the first process.

import (
   
"fmt"
   
"os"
   
"testing"


    _
"github.com/favclip/testerator/datastore"
    _
"github.com/favclip/testerator/memcache"
    _
"github.com/favclip/testerator/search"


   
"github.com/favclip/testerator"
)


func
TestMain(m *testing.M) {
    _
, _, err := testerator.SpinUp() // create process


   
if err != nil {
        fmt
.Printf(err.Error())
        os
.Exit(1)
   
}


    status
:= m.Run() // UnitTest実行!


    err
= testerator.SpinDown() // spindown process
   
if err != nil {
        fmt
.Printf(err.Error())
        os
.Exit(1)
   
}


    os
.Exit(status)
}


2017年3月17日金曜日 10時38分26秒 UTC+9 anohitosan000:
Reply all
Reply to author
Forward
0 new messages