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

adding fake fpga tests to test fpga streaming apis #1124

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

Conversation

asumit
Copy link
Contributor

@asumit asumit commented Nov 20, 2024

What does this Pull Request accomplish?

Adds tests to test various streaming apis for fpga. We use NiFpgaMockLibrary to set the behavior of fpga driver apis.
Tests in this class are testing the streaming api implementation and the data moniker service code.

What testing has been done?

Ran the tests locally and they pass

Note : I have added tests for sideband streaming and disabled it since currently we cannot test the sideband streaming apis with the inprocess

stream->Read(&read_result);

read_result.data().values(0).UnpackTo(&read_value_i32);
EXPECT_EQ(read_value_i32.value(), i + 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

When we talked on the phone, I think this assert was not working? What was the problem? What fixed it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I set the .WillRepeatedly(::testing::DoAll(::testing::SetArgPointee<2>(999), ::testing::Return(0))); on the mock api after 5 counts and after that it is passing locally everytime.

I spoke to Cifra and the read should behave like a queue and no data points should be missed. I am not sure if it was simultaneous debugging the streaming api and the client that may have caused it but it works now.

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.

2 participants