Skip to content

Conversation

@vijaysawant
Copy link
Contributor

Problem Statement

test case test_positive_create_in_different_orgs failing for cjk parameterised string with an error
selenium.common.exceptions.WebDriverException: Message: unknown error: ChromeDriver only supports characters in the BMP

Solution

filtering out non-BMP characters is the recommended way instead of removing CJK from valid_data_list()

Related Issues

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/ui/test_product.py -k 'test_positive_create_in_different_orgs'

@vijaysawant vijaysawant added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing Stream Introduced in or relating directly to Satellite Stream/Master 6.18.z Introduced in or relating directly to Satellite 6.18 labels Dec 16, 2025
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_product.py -k 'test_positive_create_in_different_orgs'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13882
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_product.py -k test_positive_create_in_different_orgs --external-logging
Test Result : ========== 7 passed, 3 deselected, 81 warnings in 1759.99s (0:29:19) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Dec 16, 2025
@vijaysawant vijaysawant marked this pull request as ready for review December 16, 2025 10:54
@vijaysawant vijaysawant requested a review from a team as a code owner December 16, 2025 10:54
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • The CJK regeneration loop in filtered_datapoint uses hard-coded values for min_length (half the original length) and max_attempts (10); consider making these configurable or at least defining them as named constants to clarify the intended behavior and make future tuning easier.
  • If all regeneration attempts fail and the fallback gen_string('cjk', 10) still produces mostly non-BMP characters, dataset['cjk'] may end up unexpectedly short; you might want to explicitly enforce a minimum length after the fallback or log when the code cannot generate a sufficiently long BMP-only CJK string.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The CJK regeneration loop in `filtered_datapoint` uses hard-coded values for `min_length` (half the original length) and `max_attempts` (10); consider making these configurable or at least defining them as named constants to clarify the intended behavior and make future tuning easier.
- If all regeneration attempts fail and the fallback `gen_string('cjk', 10)` still produces mostly non-BMP characters, `dataset['cjk']` may end up unexpectedly short; you might want to explicitly enforce a minimum length after the fallback or log when the code cannot generate a sufficiently long BMP-only CJK string.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@jnagare-redhat jnagare-redhat left a comment

Choose a reason for hiding this comment

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

LGTM

@ogajduse
Copy link
Member

I'd recommend implementing CJK generation in Fauxfactory without BMP characters first, and then follow up here in Robottelo.
omaciel/fauxfactory#129

Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

Looks like @omaciel already implemented the change in fauxfactory 🚀

Could we use it, @vijaysawant ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.18.z Introduced in or relating directly to Satellite 6.18 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR Stream Introduced in or relating directly to Satellite Stream/Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants