mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
use flowy_unit_test to make backend test work
This commit is contained in:
parent
22c8850cea
commit
353bdc592b
2 changed files with 9 additions and 7 deletions
|
@ -67,6 +67,7 @@ impl RevisionCache {
|
||||||
Ok(record)
|
Ok(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub async fn ack(&self, rev_id: i64) {
|
pub async fn ack(&self, rev_id: i64) {
|
||||||
self.memory_cache.ack(&rev_id).await;
|
self.memory_cache.ack(&rev_id).await;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,13 +105,13 @@ impl RevisionManager {
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self), err)]
|
#[tracing::instrument(level = "debug", skip(self), err)]
|
||||||
pub async fn ack_revision(&self, rev_id: i64) -> Result<(), FlowyError> {
|
pub async fn ack_revision(&self, rev_id: i64) -> Result<(), FlowyError> {
|
||||||
// For the moment, we comment out the following code in order to cause sync bugs.
|
#[cfg(feature = "flowy_unit_test")]
|
||||||
// if self.revision_sync_seq.ack(&rev_id).await.is_ok() {
|
if self.revision_sync_seq.ack(&rev_id).await.is_ok() {
|
||||||
// self.revision_cache.ack(rev_id).await;
|
self.revision_cache.ack(rev_id).await;
|
||||||
//
|
|
||||||
// #[cfg(feature = "flowy_unit_test")]
|
#[cfg(feature = "flowy_unit_test")]
|
||||||
// let _ = self.revision_ack_notifier.send(rev_id);
|
let _ = self.revision_ack_notifier.send(rev_id);
|
||||||
// }
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,6 +192,7 @@ impl RevisionSyncSequence {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
async fn ack(&self, rev_id: &i64) -> FlowyResult<()> {
|
async fn ack(&self, rev_id: &i64) -> FlowyResult<()> {
|
||||||
if let Some(pop_rev_id) = self.next_sync_rev_id().await {
|
if let Some(pop_rev_id) = self.next_sync_rev_id().await {
|
||||||
if &pop_rev_id != rev_id {
|
if &pop_rev_id != rev_id {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue