enh: simulate random i/o error
This commit is contained in:
parent
563920eea8
commit
c14363625d
|
@ -66,7 +66,6 @@ typedef struct TdFile {
|
||||||
|
|
||||||
#ifdef BUILD_WITH_RAND_ERR
|
#ifdef BUILD_WITH_RAND_ERR
|
||||||
#define BUILD_WITH_RAND_IO_ERR
|
#define BUILD_WITH_RAND_IO_ERR
|
||||||
#endif
|
|
||||||
#define STUB_RAND_IO_ERR(ret) \
|
#define STUB_RAND_IO_ERR(ret) \
|
||||||
if (tsEnableRandErr) { \
|
if (tsEnableRandErr) { \
|
||||||
uint32_t r = taosRand() % 10001; \
|
uint32_t r = taosRand() % 10001; \
|
||||||
|
@ -76,6 +75,7 @@ typedef struct TdFile {
|
||||||
return (ret); \
|
return (ret); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void taosGetTmpfilePath(const char *inputTmpDir, const char *fileNamePrefix, char *dstPath) {
|
void taosGetTmpfilePath(const char *inputTmpDir, const char *fileNamePrefix, char *dstPath) {
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
|
|
Loading…
Reference in New Issue