From: mark.j.leonard Date: Wed, 3 Apr 2019 10:47:34 +0000 (+0100) Subject: Delete temp file in FileWatcher test X-Git-Tag: 1.4.1~7 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fbabel.git;a=commitdiff_plain;h=01ade25ca96595b529842195d446a8608333bd43 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 --- 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(); }