Skip to content
Permalink
Browse files

Improved: Turn ‘ReferenceCleanerTests’ into a unit test class

(OFBIZ-11067)

Keep it disabled since it is failing for obscure reasons.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860015 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed May 25, 2019
1 parent 94c60ee commit aa874841cea2652dc193b919120fa77a9d50184f
@@ -1,4 +1,4 @@
/*******************************************************************************
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -15,25 +15,31 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
package org.apache.ofbiz.base.util.test;
*/
package org.apache.ofbiz.base.util;

import static org.apache.ofbiz.base.test.GenericTestCaseBase.useAllMemory;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

import java.util.HashSet;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;

import org.apache.ofbiz.base.lang.SourceMonitored;
import org.apache.ofbiz.base.test.GenericTestCaseBase;
import org.apache.ofbiz.base.util.ReferenceCleaner;
import org.junit.Ignore;
import org.junit.Test;

@SourceMonitored
public class ReferenceCleanerTests extends GenericTestCaseBase {
public ReferenceCleanerTests(String name) {
super(name);
}
public class ReferenceCleanerTests {

// XXX: This test has been disabled since 2014 in revision
// 1648403, so it is not evident if it is still relevant. Maybe
// we should simply remove it.
@Ignore("Failing test")
@Test
public void testReferenceCleaner() throws Exception {
assertStaticHelperClass(ReferenceCleaner.class);
final SynchronousQueue<String> queue = new SynchronousQueue<>();
Object obj = new Object();
ReferenceCleaner.Soft<Object> soft = new ReferenceCleaner.Soft<Object>(obj) {
@@ -23,7 +23,6 @@
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
<test-group case-name="basetests">
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.AssertTests"/>
<!--junit-test-suite class-name="org.apache.ofbiz.base.util.test.ReferenceCleanerTests"/-->
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilMiscTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilObjectTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilHttpTests"/>

0 comments on commit aa87484

Please sign in to comment.
You can’t perform that action at this time.