Skip to content

Commit

Permalink
There is a chance that old test attributes are still present
Browse files Browse the repository at this point in the history
  • Loading branch information
mbruin-NR committed Jan 31, 2025
1 parent 51f2bd4 commit 16787b8
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ - (void)setUp {

manager = [self samTest];
[manager removeAllSessionAttributes];

NSFileManager *fileManager = [NSFileManager defaultManager];
if([fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file]]) {
[fileManager removeItemAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file] error:nil];
}
if([fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file_private]]) {
[fileManager removeItemAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file_private] error:nil];
}
}

- (NRMASAM*) samTest {
Expand Down Expand Up @@ -294,14 +302,6 @@ - (void)waitForAttributesToPersist:(NSArray<NSString *> *)expectedAttributes tim

- (void)testPersistedSessionAnalytics {

NSFileManager *fileManager = [NSFileManager defaultManager];
if([fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file]]) {
[fileManager removeItemAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file] error:nil];
}
if([fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file_private]]) {
[fileManager removeItemAtPath:[NSString stringWithFormat:@"%@/%@",[NewRelicInternalUtils getStorePath],kNRMA_Attrib_file_private] error:nil];
}

NSString *attribute = @"blarg";
NSString *attribute2 = @"blarg2";
NSString *attribute3 = @"privateBlarg3";
Expand Down

0 comments on commit 16787b8

Please sign in to comment.