diff options
author | mark.j.leonard <mark.j.leonard@gmail.com> | 2019-04-03 11:47:34 +0100 |
---|---|---|
committer | mark.j.leonard <mark.j.leonard@gmail.com> | 2019-04-03 11:47:34 +0100 |
commit | 01ade25ca96595b529842195d446a8608333bd43 (patch) | |
tree | be2d7f4ca665e49585e949646f2ff0b8ef71e9db /src | |
parent | 77565ad85e22807027c743d119fe9bcd92247de5 (diff) |
Delete temp file in FileWatcher test
Ensure the temporary file is deleted after the test completes.
Change-Id: I25fbab4c28d9489df0ed9b6cb74a068873aa9854
Issue-ID: AAI-2280
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/aai/auth/AuthFileWatcher.java | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/aai/babel/TestAuthFileWatcher.java | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/onap/aai/auth/AuthFileWatcher.java b/src/main/java/org/onap/aai/auth/AuthFileWatcher.java index 07b522d..cb5b8ca 100644 --- a/src/main/java/org/onap/aai/auth/AuthFileWatcher.java +++ b/src/main/java/org/onap/aai/auth/AuthFileWatcher.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2019 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/onap/aai/babel/TestAuthFileWatcher.java b/src/test/java/org/onap/aai/babel/TestAuthFileWatcher.java index e213e15..4efb03e 100644 --- a/src/test/java/org/onap/aai/babel/TestAuthFileWatcher.java +++ b/src/test/java/org/onap/aai/babel/TestAuthFileWatcher.java @@ -74,6 +74,7 @@ public class TestAuthFileWatcher { } catch (AAIAuthException e) { assertThat(e.getMessage(), containsString("Error processing Auth policy file")); } + file.deleteOnExit(); Mockito.when(mockFile.lastModified()).thenReturn(1000L); task.run(); } |