Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(/dev): state transitions #5268

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

test(/dev): state transitions #5268

wants to merge 2 commits into from

Conversation

karanA-aws
Copy link
Contributor

@karanA-aws karanA-aws commented Jan 15, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Problem: The current implementation lacks a test case for tracking state changes during code generation.

Solution: Added a unit test case that covers the state transitions during the code generation process. This new test will ensure that the state changes are correctly handled and maintained throughout the code generation lifecycle.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karanA-aws karanA-aws requested a review from a team as a code owner January 15, 2025 23:34
Copy link
Member

@osdemah osdemah left a comment

Choose a reason for hiding this comment

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

LGTM


val actual = prepareState.interact(action)
assertThat(actual.nextState).isInstanceOf(PrepareCodeGenerationState::class.java)
val nextState = actual.nextState as PrepareCodeGenerationState
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we assert that this sessionState is not the same as the original PrepareCodeGenerationState object? Our issue that resulted in the COE was that the sessionState didn't change between the first PrepareCodeGenerationState (at the beginning) and this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants