-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Th2-5165] Use cache in BookInfo #253
Conversation
cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/dao/books/PageEntity.java
Outdated
Show resolved
Hide resolved
cradle-core/src/main/java/com/exactpro/cradle/CradleStorage.java
Outdated
Show resolved
Hide resolved
cradle-core/src/test/java/com/exactpro/cradle/BookInfoTest.java
Outdated
Show resolved
Hide resolved
cradle-core/src/test/java/com/exactpro/cradle/BookInfoTest.java
Outdated
Show resolved
Hide resolved
cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/CassandraStorageSettings.java
Outdated
Show resolved
Hide resolved
...c/test/java/com/exactpro/cradle/cassandra/resultset/PagesInIntervalIteratorProviderTest.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/exactpro/cradle/cassandra/dao/messages/AbstractMessageIteratorProvider.java
Show resolved
Hide resolved
* enhanced tests
cradle-core/src/main/java/com/exactpro/cradle/CradleStorage.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
@Test(dataProvider = "cacheSize") | ||
public void lazyPageAddTest(int cacheSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small note: what did we break if this test fails? I tried to figure that out for some time and the only answer I had was 'something with pages'. In my personal opinion, unit tests should be as concise as possible and answer the question: what did we break? And this test does not answer this question.
This is not a request to change it immediately, just a piece of thought about what unit tests should look like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was made as hot check. I will split it to several part at the end of task
cradle-core/src/test/java/com/exactpro/cradle/InMemoryCradleStorage.java
Outdated
Show resolved
Hide resolved
...a/com/exactpro/cradle/cassandra/integration/messages/GroupedMessageIteratorProviderTest.java
Show resolved
Hide resolved
cradle-core/src/main/java/com/exactpro/cradle/resultset/EmptyResultSet.java
Outdated
Show resolved
Hide resolved
cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/utils/StorageUtils.java
Show resolved
Hide resolved
...ssandra/src/test/java/com/exactpro/cradle/cassandra/integration/BaseCradleCassandraTest.java
Outdated
Show resolved
Hide resolved
…ntegration/BaseCradleCassandraTest.java Co-authored-by: Oleg Smirnov <[email protected]>
if (loaded.isEmpty()) { | ||
return null; | ||
} | ||
// We shouldn't register metric to avoid the `loads` >> `requests` case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please advise what this means exactly? I am looking at the code and I have no clue how to interpret this sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this comment when work on the dashboard for hit / miss rates. But I think I doesn't matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point is that it is hard to understand what this comment tries to say) Even after your comment here I still cannot get it... I think if we leave something in the code it should be clear what it says. More than one line can be used to express what you mean.
This concerns me because if the task is assigned to somebody else he or she needs all the information to continue the work. And our responsibility to leave this information either in the code or in the issue. And this information should not require decryption)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood you point and try to solve short comment in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The origin comment should be
We shouldn't register metric for empty page intervals to avoid the loads
>> requests
case
When loads number more than requests number, current dashboard for calculating hit / miss rate shows wrong values
cradle-core/src/test/java/com/exactpro/cradle/InMemoryCradleStorage.java
Outdated
Show resolved
Hide resolved
# Conflicts: # README.md # cradle-cassandra/build.gradle # cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/dao/messages/AbstractMessageIteratorProvider.java # cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/dao/messages/CassandraStoredMessageFilter.java # cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/dao/messages/MessageBatchesIteratorProvider.java # cradle-cassandra/src/main/java/com/exactpro/cradle/cassandra/dao/messages/MessagesIteratorProvider.java # gradle.properties
...a/src/main/java/com/exactpro/cradle/cassandra/dao/messages/CassandraStoredMessageFilter.java
Show resolved
Hide resolved
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
No description provided.