Separating elements from their parts.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
This commit is contained in:
@@ -11,36 +11,16 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
use super::MTTError;
|
||||
|
||||
/*
|
||||
#[cfg(test)]
|
||||
mod support_test {
|
||||
use std::time::Duration;
|
||||
|
||||
pub static TIMEOUT: Duration = Duration::from_millis(500);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum MTTError {
|
||||
AdditionMissingField(Name),
|
||||
CannotConvertMessageToRouteID,
|
||||
DocumentAlreadyExists(String),
|
||||
DocumentFieldAlreadyExists(String, Field),
|
||||
DocumentFieldMissing(String),
|
||||
DocumentFieldNotFound(String),
|
||||
DocumentFieldWrongDataType(FieldType, FieldType),
|
||||
DocumentNotFound(String),
|
||||
FieldDuplicate,
|
||||
FieldInvalidType,
|
||||
FieldMissingData,
|
||||
InvalidNone,
|
||||
RecordMismatch,
|
||||
NameDuplicate(Name),
|
||||
NameInvalidID(Uuid),
|
||||
NameMissingTranslation(Language),
|
||||
NameNotFound(Name),
|
||||
QueryCannotChangeData,
|
||||
RouteRequiresDocumentID,
|
||||
}
|
||||
*/
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
|
||||
pub enum Action {
|
||||
@@ -1591,7 +1571,8 @@ impl Router {
|
||||
|
||||
#[cfg(test)]
|
||||
mod routers {
|
||||
use super::{support_test::TIMEOUT, *};
|
||||
use crate::support_tests::TIMEOUT;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn can_pass_message() {
|
||||
@@ -1700,7 +1681,8 @@ impl Queue {
|
||||
|
||||
#[cfg(test)]
|
||||
mod queues {
|
||||
use super::{support_test::TIMEOUT, *};
|
||||
use crate::support_tests::TIMEOUT;
|
||||
use super::*;
|
||||
use std::sync::mpsc::RecvTimeoutError;
|
||||
|
||||
struct TestQueue {
|
||||
@@ -5262,7 +5244,8 @@ impl DocumentFile {
|
||||
|
||||
#[cfg(test)]
|
||||
mod document_files {
|
||||
use super::{support_test::TIMEOUT, *};
|
||||
use crate::support_tests::TIMEOUT;
|
||||
use super::*;
|
||||
use std::{sync::mpsc::RecvTimeoutError, thread::sleep};
|
||||
|
||||
fn standard_paths() -> Vec<Path> {
|
||||
@@ -6942,7 +6925,7 @@ mod document_files {
|
||||
|
||||
#[cfg(test)]
|
||||
mod createdocs {
|
||||
use super::support_test::TIMEOUT;
|
||||
use crate::support_tests::TIMEOUT;
|
||||
use super::*;
|
||||
|
||||
struct TestCreateDoc {
|
||||
@@ -7350,7 +7333,8 @@ impl MessageLog {
|
||||
|
||||
#[cfg(test)]
|
||||
mod message_logs {
|
||||
use super::{support_test::TIMEOUT, *};
|
||||
use crate::support_tests::TIMEOUT;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn does_log_store_messages() {
|
||||
@@ -7474,7 +7458,8 @@ impl Session {
|
||||
|
||||
#[cfg(test)]
|
||||
mod sessions {
|
||||
use super::{support_test::TIMEOUT, *};
|
||||
use crate::support_tests::TIMEOUT;
|
||||
use super::*;
|
||||
use std::{sync::mpsc::RecvTimeoutError, thread::sleep};
|
||||
|
||||
struct Setup {
|
||||
|
||||
Reference in New Issue
Block a user