@@ -11,7 +11,7 @@ import (
1111 "time"
1212
1313 "github.com/nativebpm/connectors/camunda/internal/vars"
14- "github.com/nativebpm/connectors/httpclient "
14+ "github.com/nativebpm/connectors/streamhttp "
1515)
1616
1717// TestExternalTask_UnmarshalJSON tests parsing of Camunda timestamp formats
@@ -113,7 +113,7 @@ func (m *MockHandler) Handle(ctx context.Context, task ExternalTask, complete Co
113113}
114114
115115func TestNew (t * testing.T ) {
116- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
116+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
117117 logger := slog .New (slog .NewTextHandler (os .Stdout , & slog.HandlerOptions {Level : slog .LevelError }))
118118
119119 worker := New (httpClient , "test-worker" , logger )
@@ -152,7 +152,7 @@ func TestNew(t *testing.T) {
152152}
153153
154154func TestNew_NilLogger (t * testing.T ) {
155- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
155+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
156156
157157 worker := New (httpClient , "test-worker" , nil )
158158
@@ -166,7 +166,7 @@ func TestNew_NilLogger(t *testing.T) {
166166}
167167
168168func TestWorker_RegisterHandler (t * testing.T ) {
169- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
169+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
170170 logger := slog .Default ()
171171 worker := New (httpClient , "test-worker" , logger )
172172
@@ -207,7 +207,7 @@ func TestWorker_RegisterHandler(t *testing.T) {
207207}
208208
209209func TestWorker_RegisterHandler_Multiple (t * testing.T ) {
210- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
210+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
211211 worker := New (httpClient , "test-worker" , nil )
212212
213213 handler1 := & MockHandler {}
@@ -234,7 +234,7 @@ func TestWorker_RegisterHandler_Multiple(t *testing.T) {
234234}
235235
236236func TestWorker_SetMaxTasks (t * testing.T ) {
237- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
237+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
238238 worker := New (httpClient , "test-worker" , nil )
239239
240240 result := worker .SetMaxTasks (20 )
@@ -250,7 +250,7 @@ func TestWorker_SetMaxTasks(t *testing.T) {
250250}
251251
252252func TestWorker_SetPollInterval (t * testing.T ) {
253- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
253+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
254254 worker := New (httpClient , "test-worker" , nil )
255255
256256 interval := 10 * time .Second
@@ -267,7 +267,7 @@ func TestWorker_SetPollInterval(t *testing.T) {
267267}
268268
269269func TestWorker_FluentAPI (t * testing.T ) {
270- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
270+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
271271 handler := & MockHandler {}
272272
273273 // Test method chaining
@@ -306,7 +306,7 @@ func TestWorker_ProcessTask(t *testing.T) {
306306 }))
307307 defer server .Close ()
308308
309- httpClient , _ := httpclient .NewClient (http.Client {}, server .URL )
309+ httpClient , _ := streamhttp .NewClient (http.Client {}, server .URL )
310310 logger := slog .New (slog .NewTextHandler (os .Stdout , & slog.HandlerOptions {Level : slog .LevelError }))
311311 worker := New (httpClient , "test-worker" , logger )
312312
@@ -344,7 +344,7 @@ func TestWorker_ProcessTask(t *testing.T) {
344344}
345345
346346func TestWorker_ProcessTask_NoHandler (t * testing.T ) {
347- httpClient , _ := httpclient .NewClient (http.Client {}, "http://localhost:8080" )
347+ httpClient , _ := streamhttp .NewClient (http.Client {}, "http://localhost:8080" )
348348 logger := slog .New (slog .NewTextHandler (os .Stdout , & slog.HandlerOptions {Level : slog .LevelError }))
349349 worker := New (httpClient , "test-worker" , logger )
350350
@@ -378,7 +378,7 @@ func TestCompleteFunc(t *testing.T) {
378378 }))
379379 defer server .Close ()
380380
381- httpClient , _ := httpclient .NewClient (http.Client {}, server .URL )
381+ httpClient , _ := streamhttp .NewClient (http.Client {}, server .URL )
382382 worker := New (httpClient , "test-worker" , nil )
383383
384384 handler := & MockHandler {}
@@ -418,7 +418,7 @@ func TestFailFunc(t *testing.T) {
418418 }))
419419 defer server .Close ()
420420
421- httpClient , _ := httpclient .NewClient (http.Client {}, server .URL )
421+ httpClient , _ := streamhttp .NewClient (http.Client {}, server .URL )
422422 worker := New (httpClient , "test-worker" , nil )
423423
424424 handler := & MockHandler {}
0 commit comments