@@ -43,6 +43,7 @@ func AddHash(t *testing.T, cache map[plumbing.Hash]*items.CachedBlob, hash strin
43
43
44
44
func TestUASTExtractorMeta (t * testing.T ) {
45
45
exr := fixtureUASTExtractor ()
46
+ defer exr .Dispose ()
46
47
assert .Equal (t , exr .Name (), "UAST" )
47
48
assert .Equal (t , len (exr .Provides ()), 1 )
48
49
assert .Equal (t , exr .Provides ()[0 ], DependencyUasts )
@@ -63,14 +64,15 @@ func TestUASTExtractorMeta(t *testing.T) {
63
64
64
65
func TestUASTExtractorConfiguration (t * testing.T ) {
65
66
exr := fixtureUASTExtractor ()
67
+ defer exr .Dispose ()
66
68
facts := map [string ]interface {}{}
67
- exr .Configure (facts )
69
+ assert . Nil ( t , exr .Configure (facts ) )
68
70
facts [ConfigUASTEndpoint ] = "localhost:9432"
69
71
facts [ConfigUASTTimeout ] = 15
70
72
facts [ConfigUASTPoolSize ] = 7
71
73
facts [ConfigUASTFailOnErrors ] = true
72
74
facts [ConfigUASTIgnoreMissingDrivers ] = []string {"test" }
73
- exr .Configure (facts )
75
+ assert . Nil ( t , exr .Configure (facts ) )
74
76
assert .Equal (t , exr .Endpoint , facts [ConfigUASTEndpoint ])
75
77
assert .NotNil (t , exr .Context )
76
78
assert .Equal (t , exr .PoolSize , facts [ConfigUASTPoolSize ])
@@ -95,6 +97,7 @@ func TestUASTExtractorNoBabelfish(t *testing.T) {
95
97
96
98
func TestUASTExtractorConsume (t * testing.T ) {
97
99
exr := fixtureUASTExtractor ()
100
+ defer exr .Dispose ()
98
101
changes := make (object.Changes , 4 )
99
102
// 2b1ed978194a94edeabbca6de7ff3b5771d4d665
100
103
treeFrom , _ := test .Repository .TreeObject (plumbing .NewHash (
@@ -211,6 +214,7 @@ func TestUASTExtractorConsume(t *testing.T) {
211
214
212
215
func TestUASTExtractorFork (t * testing.T ) {
213
216
exr1 := fixtureUASTExtractor ()
217
+ defer exr1 .Dispose ()
214
218
clones := exr1 .Fork (1 )
215
219
assert .Len (t , clones , 1 )
216
220
exr2 := clones [0 ].(* Extractor )
0 commit comments