Improve post-migration testing tools.
This commit is contained in:
parent
bb44def8b7
commit
6eddfae214
|
@ -220,6 +220,16 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
|||
return;
|
||||
}
|
||||
|
||||
DDLogInfo(@"%@ Database file size: %@",
|
||||
self.logTag,
|
||||
[OWSFileSystem fileSizeOfPath:TSStorageManager.legacyDatabaseFilePath]);
|
||||
DDLogInfo(@"%@ \t SHM file size: %@",
|
||||
self.logTag,
|
||||
[OWSFileSystem fileSizeOfPath:TSStorageManager.legacyDatabaseFilePath_SHM]);
|
||||
DDLogInfo(@"%@ \t WAL file size: %@",
|
||||
self.logTag,
|
||||
[OWSFileSystem fileSizeOfPath:TSStorageManager.legacyDatabaseFilePath_WAL]);
|
||||
|
||||
NSError *_Nullable error = [self convertDatabaseIfNecessary];
|
||||
// TODO: Handle this error.
|
||||
OWSAssert(!error);
|
||||
|
|
|
@ -456,12 +456,10 @@ typedef NSData *_Nullable (^CreateDatabaseMetadataBlock)(void);
|
|||
return self.database.newConnection;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
- (BOOL)registerExtension:(YapDatabaseExtension *)extension withName:(NSString *)extensionName
|
||||
{
|
||||
return [self.database registerExtension:extension withName:extensionName];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)asyncRegisterExtension:(YapDatabaseExtension *)extension
|
||||
withName:(NSString *)extensionName
|
||||
|
|
|
@ -26,6 +26,8 @@ void runAsyncRegistrationsForStorage(OWSStorage *storage);
|
|||
+ (NSString *)databaseFilePath;
|
||||
|
||||
+ (NSString *)legacyDatabaseFilePath;
|
||||
+ (NSString *)legacyDatabaseFilePath_SHM;
|
||||
+ (NSString *)legacyDatabaseFilePath_WAL;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ void AssertIsOnMainThread(void);
|
|||
|
||||
#define OWSRaiseException(name, formatParam, ...) \
|
||||
{ \
|
||||
DDLogError(@"Exception: %@ %@", name, [NSString stringWithFormat:formatParam, ##__VA_ARGS__]); \
|
||||
[DDLog flushLog]; \
|
||||
@throw [NSException exceptionWithName:name \
|
||||
reason:[NSString stringWithFormat:formatParam, ##__VA_ARGS__] \
|
||||
|
@ -134,6 +135,8 @@ void AssertIsOnMainThread(void);
|
|||
|
||||
#define OWSRaiseExceptionWithUserInfo(name, userInfoParam, formatParam, ...) \
|
||||
{ \
|
||||
DDLogError( \
|
||||
@"Exception: %@ %@ %@", name, userInfoParam, [NSString stringWithFormat:formatParam, ##__VA_ARGS__]); \
|
||||
[DDLog flushLog]; \
|
||||
@throw [NSException exceptionWithName:name \
|
||||
reason:[NSString stringWithFormat:formatParam, ##__VA_ARGS__] \
|
||||
|
|
Loading…
Reference in New Issue