Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
074dc3b9
Commit
074dc3b9
authored
May 10, 2024
by
Daniel Hiltgen
Browse files
Integration fixes
parent
86f9b582
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
integration/concurrency_test.go
integration/concurrency_test.go
+1
-1
integration/utils_test.go
integration/utils_test.go
+2
-2
No files found.
integration/concurrency_test.go
View file @
074dc3b9
...
@@ -217,7 +217,7 @@ func TestMultiModelStress(t *testing.T) {
...
@@ -217,7 +217,7 @@ func TestMultiModelStress(t *testing.T) {
defer
wg
.
Done
()
defer
wg
.
Done
()
for
j
:=
0
;
j
<
3
;
j
++
{
for
j
:=
0
;
j
<
3
;
j
++
{
slog
.
Info
(
"Starting"
,
"req"
,
i
,
"iter"
,
j
,
"model"
,
req
[
i
]
.
Model
)
slog
.
Info
(
"Starting"
,
"req"
,
i
,
"iter"
,
j
,
"model"
,
req
[
i
]
.
Model
)
DoGenerate
(
ctx
,
t
,
client
,
req
[
i
],
resp
[
i
],
9
0
*
time
.
Second
,
5
*
time
.
Second
)
DoGenerate
(
ctx
,
t
,
client
,
req
[
i
],
resp
[
i
],
12
0
*
time
.
Second
,
5
*
time
.
Second
)
}
}
}(
i
)
}(
i
)
}
}
...
...
integration/utils_test.go
View file @
074dc3b9
...
@@ -85,7 +85,7 @@ func GetTestEndpoint() (*api.Client, string) {
...
@@ -85,7 +85,7 @@ func GetTestEndpoint() (*api.Client, string) {
var
serverMutex
sync
.
Mutex
var
serverMutex
sync
.
Mutex
var
serverReady
bool
var
serverReady
bool
func
startServer
(
ctx
context
.
Context
,
ollamaHost
string
)
error
{
func
startServer
(
t
*
testing
.
T
,
ctx
context
.
Context
,
ollamaHost
string
)
error
{
// Make sure the server has been built
// Make sure the server has been built
CLIName
,
err
:=
filepath
.
Abs
(
"../ollama"
)
CLIName
,
err
:=
filepath
.
Abs
(
"../ollama"
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -200,7 +200,7 @@ func InitServerConnection(ctx context.Context, t *testing.T) (*api.Client, strin
...
@@ -200,7 +200,7 @@ func InitServerConnection(ctx context.Context, t *testing.T) (*api.Client, strin
}
}
lifecycle
.
ServerLogFile
=
fp
.
Name
()
lifecycle
.
ServerLogFile
=
fp
.
Name
()
fp
.
Close
()
fp
.
Close
()
require
.
NoError
(
t
,
startServer
(
ctx
,
testEndpoint
))
require
.
NoError
(
t
,
startServer
(
t
,
ctx
,
testEndpoint
))
}
}
return
client
,
testEndpoint
,
func
()
{
return
client
,
testEndpoint
,
func
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment