Skip to content

Conversation

@kitalkuyo-gita
Copy link

Purpose of change

Related to issues-161

Tests

API

Documentation

@wenjin272
Copy link
Collaborator

Hi, @kitalkuyo-gita. Thanks for your contribution.

In the current implementation, only the integration tests for Ollama have been isolated, which limits the scalability of the integration tests. We would prefer to isolate the tests for the entire integration module, rather than only for Ollama.

Copy link
Collaborator

@wenjin272 wenjin272 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @kitalkuyo-gita. Thanks for your work, LGTM, only one minor comment.

And there is conflict with main branch, you may need apply rebase on it.

@kitalkuyo-gita
Copy link
Author

Hi, @kitalkuyo-gita. Thanks for your work, LGTM, only one minor comment.

And there is conflict with main branch, you may need apply rebase on it.

it's ready

Copy link
Collaborator

@wenjin272 wenjin272 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @kitalkuyo-gita. I'm not sure whether some code was missed in the last review or there have been recent changes, so I've left some new comments.

In addition, in git practices, there are discussions regarding the use of merge versus rebase. However, in Flink-Agents, we use rebase to ensure the linearity of the main branch. So you need reorganize the commits of this pr and rebase on the main branch, not merge it.

env:
PYTEST_SKIP_MARKERS: "integration"

ollama_integration_tests:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this can be removed.

from flink_agents.plan.tools.function_tool import FunctionTool, from_callable

# Mark all tests in this module as ollama tests
pytestmark = pytest.mark.ollama
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be pytest.mark.ollama.

def test_ollama_embedding_setup() -> None:
"""Test embedding functionality with OllamaEmbeddingModelSetup."""
# Use longer timeout for embedding in CI environment (slower resources)
request_timeout = 120.0 if os.environ.get("CI") else 30.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This request timeout could also happen in local environment, so can uniform to 120.0

def test_openai_embedding_model() -> None: # noqa: D103
connection = OpenAIEmbeddingModelConnection(
name="openai", api_key=api_key
name="openai", api_key=api_key or "fake-key"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this test is not skipped, the api_key must not be None, the or "fake-key" maybe useless.

api_key=api_key,
tenant=tenant,
database=database,
api_key=api_key or "fake-key",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto



@pytest.mark.skipif(api_key is None, reason="TEST_API_KEY is not set")
@pytest.mark.integration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have marked all tests in this module above, this decorator maybe not needed.

@GreatEugenius GreatEugenius added priority/major Default priority of the PR or issue. affectVersion/0.2.0 The bug affects the 0.2.0 version. The features are not needed. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. and removed affectVersion/0.2.0 The bug affects the 0.2.0 version. The features are not needed. labels Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants