You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2017/09/17 12:30:41 UTC

[myfaces-trinidad] 18/36: clean up

This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1.2.12.2-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git

commit c12f150ac9d200a495631a6b69df9cc249c1bffd
Author: Matthias Wessendorf <ma...@apache.org>
AuthorDate: Wed Feb 10 22:01:35 2010 +0000

    clean up
---
 .../myfaces/trinidad/util/ComponentReferenceTest.java | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java b/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java
index f7ad481..f62c452 100644
--- a/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java
+++ b/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.trinidad.util;
 
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.ObjectInputStream;
@@ -111,18 +112,22 @@ public class ComponentReferenceTest extends FacesTestCase
 
     try 
     {
-      FileOutputStream fos = new FileOutputStream("t.tmp");
+      FileOutputStream fos = new FileOutputStream("trinidad.failover");
       ObjectOutputStream oos = new ObjectOutputStream(fos);
 
       oos.writeObject(uiRef);
 
-      FileInputStream fis = new FileInputStream("t.tmp");
+      FileInputStream fis = new FileInputStream("trinidad.failover");
       ObjectInputStream ois = new ObjectInputStream(fis);
 
       uiRef = (ComponentReference<UIInput>) ois.readObject();
 
       referencedComp = uiRef.getComponent();
       assertEquals(input, referencedComp);
+
+      // clean up...
+      File failoverFile = new File("trinidad.failover");
+      failoverFile.delete();
     }
     catch (Exception e)
     {
@@ -151,18 +156,22 @@ public class ComponentReferenceTest extends FacesTestCase
     // fake the failover
     try 
     {
-      FileOutputStream fos = new FileOutputStream("t.tmp");
+      FileOutputStream fos = new FileOutputStream("trinidad.failover");
       ObjectOutputStream oos = new ObjectOutputStream(fos);
 
       oos.writeObject(uiRef);
 
-      FileInputStream fis = new FileInputStream("t.tmp");
+      FileInputStream fis = new FileInputStream("trinidad.failover");
       ObjectInputStream ois = new ObjectInputStream(fis);
 
       uiRef = (ComponentReference<UIInput>) ois.readObject();
 
       referencedComp = uiRef.getComponent();
       assertEquals(input1, referencedComp);
+
+      // clean up...
+      File failoverFile = new File("trinidad.failover");
+      failoverFile.delete();
     }
     catch (Exception e)
     {
@@ -516,4 +525,4 @@ public class ComponentReferenceTest extends FacesTestCase
 
     assertEquals(input1, referencedComp);
   }
-}
\ No newline at end of file
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.