ent/circleci: adding linter tests

Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/80

Reviewed By: a8m

Differential Revision: D17837182

fbshipit-source-id: 9fb539fd6cebc064d2d2804bd52e0fbf413cfc93
This commit is contained in:
Alex Snast
2019-10-10 04:43:53 -07:00
committed by Facebook Github Bot
parent fdf98f3b8d
commit ce2bc07c1a
7 changed files with 103 additions and 24 deletions

View File

@@ -104,10 +104,11 @@ func (d *Dialer) Dial(uri string) (*Conn, error) {
// DialContext creates a new Gremlin connection.
func (d *Dialer) DialContext(ctx context.Context, uri string) (*Conn, error) {
c, _, err := d.Dialer.DialContext(ctx, uri, nil)
c, rsp, err := d.Dialer.DialContext(ctx, uri, nil)
if err != nil {
return nil, errors.Wrapf(err, "gremlin: dialing uri %s", uri)
}
defer rsp.Body.Close()
conn := &Conn{
conn: c,
@@ -168,7 +169,7 @@ func (c *Conn) Execute(ctx context.Context, req *gremlin.Request) (*gremlin.Resp
// Close connection with a Gremlin server.
func (c *Conn) Close() error {
c.grp.Go(func() error { return ErrConnClosed })
c.grp.Wait()
_ = c.grp.Wait()
return nil
}