@@ -13,6 +13,7 @@ import (
1313
1414 "go.opentelemetry.io/obi/pkg/appolly/app/svc"
1515 "go.opentelemetry.io/obi/pkg/appolly/discover/exec"
16+ "go.opentelemetry.io/obi/pkg/appolly/services"
1617)
1718
1819// successfulExtractRoutes simulates a successful route extraction
@@ -70,7 +71,7 @@ func createTestFileInfo(language svc.InstrumentableType) *exec.FileInfo {
7071}
7172
7273func TestHarvestRoutes_Successful (t * testing.T ) {
73- harvester := NewRouteHarvester ([]string {}, 1 * time .Second )
74+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 1 * time .Second )
7475 harvester .javaExtractRoutes = successfulExtractRoutes
7576
7677 fileInfo := createTestFileInfo (svc .InstrumentableJava )
@@ -84,7 +85,7 @@ func TestHarvestRoutes_Successful(t *testing.T) {
8485}
8586
8687func TestHarvestRoutes_Error (t * testing.T ) {
87- harvester := NewRouteHarvester ([]string {}, 1 * time .Second )
88+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 1 * time .Second )
8889 harvester .javaExtractRoutes = errorExtractRoutes
8990
9091 fileInfo := createTestFileInfo (svc .InstrumentableJava )
@@ -97,7 +98,7 @@ func TestHarvestRoutes_Error(t *testing.T) {
9798}
9899
99100func TestHarvestRoutes_Timeout (t * testing.T ) {
100- harvester := NewRouteHarvester ([]string {}, 100 * time .Millisecond ) // Short timeout
101+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 100 * time .Millisecond ) // Short timeout
101102 harvester .javaExtractRoutes = timeoutExtractRoutes
102103
103104 fileInfo := createTestFileInfo (svc .InstrumentableJava )
@@ -120,7 +121,7 @@ func TestHarvestRoutes_Timeout(t *testing.T) {
120121}
121122
122123func TestHarvestRoutes_Panic (t * testing.T ) {
123- harvester := NewRouteHarvester ([]string {}, 1 * time .Second )
124+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 1 * time .Second )
124125 harvester .javaExtractRoutes = panicExtractRoutes
125126
126127 fileInfo := createTestFileInfo (svc .InstrumentableJava )
@@ -137,7 +138,7 @@ func TestHarvestRoutes_Panic(t *testing.T) {
137138}
138139
139140func TestHarvestRoutes_SlowButSuccessful (t * testing.T ) {
140- harvester := NewRouteHarvester ([]string {}, 200 * time .Millisecond ) // Enough time for slow operation
141+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 200 * time .Millisecond ) // Enough time for slow operation
141142 harvester .javaExtractRoutes = slowButSuccessfulExtractRoutes
142143
143144 fileInfo := createTestFileInfo (svc .InstrumentableJava )
@@ -151,7 +152,7 @@ func TestHarvestRoutes_SlowButSuccessful(t *testing.T) {
151152}
152153
153154func TestHarvestRoutes_EmptyResult (t * testing.T ) {
154- harvester := NewRouteHarvester ([]string {}, 1 * time .Second )
155+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 1 * time .Second )
155156 harvester .javaExtractRoutes = emptyResultExtractRoutes
156157
157158 fileInfo := createTestFileInfo (svc .InstrumentableJava )
@@ -165,7 +166,7 @@ func TestHarvestRoutes_EmptyResult(t *testing.T) {
165166}
166167
167168func TestHarvestRoutes_NonJavaLanguage (t * testing.T ) {
168- harvester := NewRouteHarvester ([]string {}, 1 * time .Second )
169+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 1 * time .Second )
169170 // javaExtractRoutes should not be called for non-Java languages
170171 harvester .javaExtractRoutes = func (_ int32 ) (* RouteHarvesterResult , error ) {
171172 t .Fatal ("javaExtractRoutes should not be called for non-Java languages" )
@@ -181,7 +182,7 @@ func TestHarvestRoutes_NonJavaLanguage(t *testing.T) {
181182}
182183
183184func TestHarvestRoutes_MultipleTimeouts (t * testing.T ) {
184- harvester := NewRouteHarvester ([]string {}, 50 * time .Millisecond )
185+ harvester := NewRouteHarvester (& services. RouteHarvestingConfig {}, []string {}, 50 * time .Millisecond )
185186 harvester .javaExtractRoutes = timeoutExtractRoutes
186187
187188 fileInfo := createTestFileInfo (svc .InstrumentableJava )
0 commit comments