Skip to content

Commit 892f455

Browse files
committed
Re-add previously skipped tests
1 parent 244fdf6 commit 892f455

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

neo4j/test-integration/timeout_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ var _ = Describe("Timeout and Lifetime", func() {
9494
Expect(log.Infos).Should(ContainElement(ContainSubstring("reached its maximum lifetime")))
9595
})
9696

97-
XIt("should timeout connection when SocketConnectTimeout is hit", func() {
97+
It("should timeout connection when SocketConnectTimeout is hit", func() {
9898
var err error
9999
var driver neo4j.Driver
100100
var session neo4j.Session
101101

102-
driver, err = neo4j.NewDriver("bolt://192.168.0.0:8080", server.AuthToken(), server.Config(), func(config *neo4j.Config) {
102+
driver, err = neo4j.NewDriver("bolt://10.255.255.1:8080", server.AuthToken(), server.Config(), func(config *neo4j.Config) {
103103
config.Log = log
104-
config.SocketConnectTimeout = 5 * time.Second
104+
config.SocketConnectTimeout = 1 * time.Second
105105
})
106106
Expect(err).To(BeNil())
107107
Expect(driver).NotTo(BeNil())

neo4j/test-integration/types_test.go

+24-23
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package test_integration
2222
import (
2323
"github.com/neo4j/neo4j-go-driver/neo4j"
2424
"github.com/neo4j/neo4j-go-driver/neo4j/test-integration/control"
25+
"math/rand"
2526

2627
. "github.com/onsi/ginkgo"
2728
. "github.com/onsi/gomega"
@@ -252,29 +253,29 @@ var _ = Describe("Types", func() {
252253
Expect(result.Err()).To(BeNil())
253254
})
254255

255-
//It("should be able to send and receive large string property", func() {
256-
// var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
257-
//
258-
// randSeq := func (n int) string {
259-
// b := make([]rune, n)
260-
// for i := range b {
261-
// b[i] = letters[rand.Intn(len(letters))]
262-
// }
263-
// return string(b)
264-
// }
265-
//
266-
// value := randSeq(20 * 1024)
267-
//
268-
// result, err = session.Run("CREATE (n {value: $value}) RETURN n.value", &map[string]interface{}{"value": value})
269-
// Expect(err).To(BeNil())
270-
//
271-
// if result.Next() {
272-
// Expect(result.Record().GetByIndex(0)).To(BeAssignableToTypeOf(""))
273-
// Expect(result.Record().GetByIndex(0)).To(Equal(value))
274-
// }
275-
// Expect(result.Next()).To(BeFalse())
276-
// Expect(result.Err()).To(BeNil())
277-
//})
256+
It("should be able to send and receive large string property", func() {
257+
var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
258+
259+
randSeq := func(n int) string {
260+
b := make([]rune, n)
261+
for i := range b {
262+
b[i] = letters[rand.Intn(len(letters))]
263+
}
264+
return string(b)
265+
}
266+
267+
value := randSeq(20 * 1024)
268+
269+
result, err = session.Run("CREATE (n {value: $value}) RETURN n.value", map[string]interface{}{"value": value})
270+
Expect(err).To(BeNil())
271+
272+
if result.Next() {
273+
Expect(result.Record().GetByIndex(0)).To(BeAssignableToTypeOf(""))
274+
Expect(result.Record().GetByIndex(0)).To(Equal(value))
275+
}
276+
Expect(result.Next()).To(BeFalse())
277+
Expect(result.Err()).To(BeNil())
278+
})
278279

279280
It("should be able to receive a node with properties", func() {
280281
result, err = session.Run("CREATE (n:Person:Manager {id: 1, name: 'a name'}) RETURN n", nil)

0 commit comments

Comments
 (0)