Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-94170

Javascript minifier does strip expected characters

    Details

      Description

      Caused by LPS-92354

      Shown by failing integration test: GoogleJavascriptMinifierTest

           [exec] com.frontend.js.minifier.GoogleJavascriptMinifierTest > testMinifierCode STANDARD_OUT
           [exec]     Loading jar:file:/opt/dev/projects/github/liferay-portal/.m2/com/liferay/portal/com.liferay.portal.impl/4.0.0-SNAPSHOT/com.liferay.portal.impl-4.0.0-SNAPSHOT.jar!/system.properties
           [exec]     Loading jar:file:/opt/dev/projects/github/liferay-portal/bundles/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
           [exec]     Loading file:/opt/dev/projects/github/liferay-portal/bundles/tomcat-9.0.17/webapps/ROOT/WEB-INF/classes/system-ext.properties
           [exec] 
           [exec] com.frontend.js.minifier.GoogleJavascriptMinifierTest > testMinifierCode FAILED
           [exec]     java.lang.AssertionError: expected:<0> but was:<33>
           [exec]         at org.junit.Assert.fail(Assert.java:88)
           [exec]         at org.junit.Assert.failNotEquals(Assert.java:834)
           [exec]         at org.junit.Assert.assertEquals(Assert.java:645)
           [exec]         at org.junit.Assert.assertEquals(Assert.java:631)
           [exec]         at com.frontend.js.minifier.GoogleJavascriptMinifierTest.testMinifierCode(GoogleJavascriptMinifierTest.java:45)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]         at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
           [exec]         at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
           [exec]         at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
           [exec]         at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
           [exec]         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
           [exec]         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
           [exec]         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
           [exec]         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
           [exec]         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
           [exec]         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
           [exec]         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
           [exec]         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
           [exec]         at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
           [exec]         at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]         at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
           [exec]         at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
           [exec]         at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
           [exec]         at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
           [exec]         at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]         at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
           [exec]         at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
           [exec]         at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
           [exec]         at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
           [exec]         at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
           [exec]         at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
           [exec]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           [exec]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           [exec]         at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
           [exec]         at java.lang.Thread.run(Thread.java:745)
           [exec] 
           [exec] com.frontend.js.minifier.GoogleJavascriptMinifierTest > testMinifierSpaces STARTED
           [exec] 
           [exec] com.frontend.js.minifier.GoogleJavascriptMinifierTest > testMinifierSpaces FAILED
           [exec]     java.lang.AssertionError: expected:<0> but was:<4>
           [exec]         at org.junit.Assert.fail(Assert.java:88)
           [exec]         at org.junit.Assert.failNotEquals(Assert.java:834)
           [exec]         at org.junit.Assert.assertEquals(Assert.java:645)
           [exec]         at org.junit.Assert.assertEquals(Assert.java:631)
           [exec]         at com.frontend.js.minifier.GoogleJavascriptMinifierTest.testMinifierSpaces(GoogleJavascriptMinifierTest.java:76)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]         at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
           [exec]         at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
           [exec]         at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
           [exec]         at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
           [exec]         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
           [exec]         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
           [exec]         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
           [exec]         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
           [exec]         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
           [exec]         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
           [exec]         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
           [exec]         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
           [exec]         at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
           [exec]         at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
           [exec]         at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]         at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
           [exec]         at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
           [exec]         at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
           [exec]         at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
           [exec]         at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]         at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
           [exec]         at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
           [exec]         at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
           [exec]         at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
           [exec]         at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
           [exec]         at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
           [exec]         at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
           [exec]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           [exec]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           [exec]         at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
           [exec]         at java.lang.Thread.run(Thread.java:745)
      

      For example, testMinifierSpaces does not strip tab, space, return characters.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                victor.ware Victor Ware
                Reporter:
                victor.ware Victor Ware
                Participants of an Issue:
                Recent user:
                Brian Wulbern
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  21 weeks, 6 days ago

                  Packages

                  Version Package
                  Master