Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Update to GWT 2.6.1, Guava 17, RichFaces 4.5
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit b0b74bd
Merge: 13f1591 0dc9314
Author: Carlos A. Munoz <camunoz@redhat.com>
Date:   Mon Nov 24 12:18:32 2014 +1000

    Merge remote-tracking branch 'origin/master' into gwt260

commit 13f1591
Author: Carlos A. Munoz <camunoz@redhat.com>
Date:   Thu Nov 20 09:20:50 2014 +1000

    Fix failure to update version group screen when adding languages or projects.

    This is apparently only happening with Wildfly for some reason. EAP does not seem to have that problem.
    Solved by running one of the involved a4j:jsFunction in a separate 'context' by using an immediate setTimeout.

commit eac7b6e
Author: Carlos Munoz <chavo16@hotmail.com>
Date:   Mon Nov 17 13:48:10 2014 +1000

    Correct functional test issue.

    The version filter may end up with the wrong results if a user is able to change the search query before a previous request for filtering has returned.

commit 47bcd2f
Author: Carlos Munoz <chavo16@hotmail.com>
Date:   Mon Nov 17 10:27:58 2014 +1000

    Use Richfaces’ column sorting capabilities instead of custom ones.

    Richfaces has changed the behaviour of their column sorting slightly, but it should not be a problem for existing users.

commit eb28022
Author: Carlos Munoz <chavo16@hotmail.com>
Date:   Mon Nov 17 09:37:10 2014 +1000

    Improve usability on tables with auto-filter columns.

    This seems to only work on EAP 6.3 and over.
    Still need to add an ajax indicator when there is a filtering operation going on in the background.

commit c14bb26
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Thu Nov 13 14:54:19 2014 +1000

    Disable built-in filter controls for tables

commit 1571aa5
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Thu Nov 13 13:43:37 2014 +1000

    Fix broken/intermittent tests

    - Update id for test: EditHomePageTest.editPageContent
    - @ignore intermittent tests EditTranslationMemoryTest.mustClearBeforeDelete
      and TranslationHistoryTest.compareTranslationHistory

commit 1346333
Merge: a4178fd 395a7d5
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Mon Nov 10 12:26:33 2014 +1000

    Merge remote-tracking branch 'origin/master' into gwt260

commit a4178fd
Merge: ec7a651 0e095d2
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Thu Nov 6 13:33:13 2014 +1000

    Merge remote-tracking branch 'origin/master' into gwt260

commit ec7a651
Merge: 905479b 89389da
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Mon Nov 3 15:04:20 2014 +1000

    Merge remote-tracking branch 'origin/master' into gwt260

commit 905479b
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Mon Nov 3 15:04:02 2014 +1000

    Upgrade to RichFaces 4.5.0.Final

commit 913fdc8
Merge: b04292f 73e7e2c
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Tue Oct 21 09:59:22 2014 +1000

    Merge remote-tracking branch 'origin/master' into gwt260

    Conflicts:
    	zanata-war/pom.xml
    	zanata-war/src/main/java/org/zanata/service/impl/CopyVersionServiceImpl.java

commit b04292f
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Fri Oct 17 15:35:21 2014 +1000

    Upgrade to RichFaces 4.5.0.CR2 and Guava 18.0

commit a393d9f
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Tue Sep 2 15:29:00 2014 +1000

    Upgrade to RichFaces 4.5.0.Beta1

commit 290296f
Merge: 9a841a9 f8529af
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Fri Sep 12 11:09:12 2014 +1000

    Merge remote branch 'origin/master' into gwt260

    Conflicts:
    	pom.xml
    	zanata-war/pom.xml
    	zanata-war/src/main/java/org/zanata/webtrans/client/ui/EditorButtonsWidget.java
    	zanata-war/src/main/java/org/zanata/webtrans/client/ui/SourcePanel.java
    	zanata-war/src/main/java/org/zanata/webtrans/client/view/TransUnitsTableView.java
    	zanata-war/src/main/java/org/zanata/webtrans/client/view/TranslationEditorView.java

commit 9a841a9
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Wed Jul 9 14:47:16 2014 +1000

    Make enforcer happy

commit d9bbdec
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Tue May 6 17:55:44 2014 +1000

    Upgrade richfaces to 4.5.0.Alpha2

commit c081e30
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Tue May 6 13:03:11 2014 +1000

    Remove gwt-dev from the dependency list; clean up enforcer exceptions

commit 64af778
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Mon May 5 14:32:14 2014 +1000

    Upgrade to GWT 2.6.1, Guava to 17.0

    Replace com.google.gwt.core.client.GWT with com.google.gwt.core.shared.GWT.
    Introduce gwtmockito for tests which need to create ClickEvents:
      https://groups.google.com/d/msg/google-web-toolkit/H0Blv3C_fns/35PqYGlGvQ8J
    Upgrade Guava to be compatible with new GWT:
      https://groups.google.com/d/msg/google-web-toolkit/yAjtlspZiDo/9L1TvpmSbZsJ
  • Loading branch information
seanf committed Nov 25, 2014
1 parent 0dc9314 commit 3975476
Show file tree
Hide file tree
Showing 30 changed files with 80 additions and 308 deletions.
7 changes: 0 additions & 7 deletions functional-test/pom.xml
Expand Up @@ -37,8 +37,6 @@
<ds.connection.url>jdbc:mysql://localhost:${mysql.port}/${ds.database}?characterEncoding=UTF-8</ds.connection.url>
<ds.driver.class>com.mysql.jdbc.Driver</ds.driver.class>

<guava.version>15.0</guava.version>

<!-- target zanata instance will be built by war overlay -->
<zanata.test.war.name>zanata-test-${project.version}</zanata.test.war.name>
<zanata.instance.url>http://${cargo.host}:${cargo.servlet.port}/${context.path}/</zanata.instance.url>
Expand Down Expand Up @@ -96,11 +94,6 @@
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.cssparser</groupId>
<artifactId>cssparser</artifactId>
<version>0.9.13</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Expand Up @@ -47,7 +47,7 @@ public EditHomeContentPage enterText(String text) {
log.info("Enter homepage code\n{}", text);
// Switch to the CKEditor frame
getDriver().switchTo().frame(waitForWebElement(By
.id("cke_contents_homeContentForm:homeContent:inp"))
.id("cke_homeContentForm:homeContent:inp"))
.findElement(By.tagName("iframe")));
waitForWebElement(By.tagName("body")).sendKeys(text);
// Switch back!
Expand Down
Expand Up @@ -23,12 +23,14 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

import org.apache.commons.io.IOUtils;
import org.zanata.util.Constants;
import org.zanata.util.PropertiesHolder;
import com.google.common.base.Charsets;
Expand All @@ -39,8 +41,6 @@
import com.google.common.base.Strings;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.io.CharStreams;
import com.google.common.io.InputSupplier;
import com.google.common.util.concurrent.SimpleTimeLimiter;
import lombok.extern.slf4j.Slf4j;

Expand Down Expand Up @@ -143,15 +143,19 @@ private void logOutputLines(List<String> output) {
}
}

public static List<String> getOutput(Process process) throws IOException {
final InputStream inputStream = process.getInputStream();

return CharStreams.readLines(CharStreams.newReaderSupplier(
new InputSupplier<InputStream>() {
@Override
public InputStream getInput() throws IOException {
return inputStream;
}
}, Charsets.UTF_8));
/**
* Returns process's output as a list of strings; closes all I/O streams.
* @param process
* @return
* @throws IOException
*/
private static List<String> getOutput(Process process) throws IOException {
try (
InputStream in = process.getInputStream();
InputStream ignored = process.getErrorStream();
OutputStream ignored2 = process.getOutputStream();
) {
return IOUtils.readLines(in, Charsets.UTF_8);
}
}
}
Expand Up @@ -22,6 +22,7 @@

import java.io.File;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
Expand Down Expand Up @@ -273,6 +274,7 @@ public void dontClearTranslationMemory() throws Exception {
"entry before it can be deleted",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
@Ignore // fails intermittently
public void mustClearBeforeDelete() throws Exception {
String forceClear = "forcecleartodelete";
File importFile = testFileGenerator.openTestFile("test-tmx.xml");
Expand Down
Expand Up @@ -20,6 +20,7 @@
*/
package org.zanata.feature.editor;

import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
Expand Down Expand Up @@ -65,6 +66,7 @@ public void showTranslationHistory() {
}

@Test
@Ignore // fails intermittently
public void compareTranslationHistory() {
new LoginWorkFlow().signIn("admin", "admin");
EditorPage editorPage = new ProjectWorkFlow()
Expand Down
Expand Up @@ -91,13 +91,15 @@ public void versionSearchFiltering() throws Exception {

assertVersions(projectVersionsPage, 1, new String[]{"bravo"});

projectVersionsPage.waitForPageSilence();
projectVersionsPage = projectVersionsPage
.clearVersionSearch()
.enterVersionSearch("charlie")
.waitForDisplayedVersions(0);

assertVersions(projectVersionsPage, 0, new String[]{});

projectVersionsPage.waitForPageSilence();
projectVersionsPage = projectVersionsPage
.clearVersionSearch()
.waitForDisplayedVersions(2);
Expand Down
17 changes: 11 additions & 6 deletions pom.xml
Expand Up @@ -24,8 +24,8 @@
<cobertura.total-branch-rate>30</cobertura.total-branch-rate>
<cobertura.halt.failure>false</cobertura.halt.failure>
<delombok.dir>${project.build.directory}/delombok/org/zanata</delombok.dir>
<guava.version>14.0.1</guava.version>
<gwt.version>2.5.1</gwt.version>
<guava.version>18.0</guava.version>
<gwt.version>2.6.1</gwt.version>
<icu4j.version>50.1.1</icu4j.version>
<lombok.source.dir>${project.build.sourceDirectory}/org/zanata</lombok.source.dir>
<lucene.version>3.6.2</lucene.version>
Expand All @@ -39,7 +39,8 @@
<zanata.client.version>3.3.1</zanata.client.version>
<zanata.common.version>3.4.0</zanata.common.version>

<richfaces.version>4.3.7.Final</richfaces.version>
<richfaces.version>4.5.0.Final</richfaces.version>

<shrinkwrap.desc.version>2.0.0-alpha-5</shrinkwrap.desc.version>

<!-- see http://community.jboss.org/wiki/HibernateCompatibilityMatrix?decorator=print -->
Expand Down Expand Up @@ -126,10 +127,8 @@
<!-- make sure the richfaces version is not provided by the seam bom -->
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<artifactId>richfaces</artifactId>
<version>${richfaces.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>


Expand Down Expand Up @@ -557,6 +556,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>net.sourceforge.cssparser</groupId>
<artifactId>cssparser</artifactId>
<version>0.9.14</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
Expand Down
16 changes: 4 additions & 12 deletions zanata-war/pom.xml
Expand Up @@ -162,6 +162,8 @@
</configuration>
</plugin>



<plugin>
<groupId>com.ning.maven.plugins</groupId>
<artifactId>maven-duplicate-finder-plugin</artifactId>
Expand Down Expand Up @@ -1498,19 +1500,9 @@
</dependency>

<!-- Richfaces -->

<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-api</artifactId>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<scope>runtime</scope>
<groupId>org.richfaces</groupId>
<artifactId>richfaces</artifactId>
</dependency>

<dependency>
Expand Down
Expand Up @@ -47,7 +47,6 @@

import com.google.common.base.Strings;
import com.google.common.io.Files;
import com.google.common.io.InputSupplier;

@Slf4j
public class MigrateRawDocumentsToFileSystem implements CustomTaskChange {
Expand Down Expand Up @@ -265,12 +264,7 @@ private File createFileInConfiguredDirectory(String fileName) {

private void writeStreamToFile(final InputStream stream, File file)
throws IOException {
InputSupplier<InputStream> input = new InputSupplier<InputStream>() {
public InputStream getInput() throws IOException {
return stream;
}
};
Files.copy(input, file);
Files.asByteSink(file).writeFrom(stream);
}

private void changeFileIdFromOldToNew(String oldFileId, String newFileId)
Expand Down
Expand Up @@ -144,7 +144,7 @@ public void scan(File file, String documentName)
}

private void doScan(File file, String documentName) {
Stopwatch stop = new Stopwatch().start();
Stopwatch stop = Stopwatch.createStarted();
CommandLine cmdLine = buildCommandLine(file);
ByteArrayOutputStream scannerOutput = new ByteArrayOutputStream();
Executor executor = buildExecutor(scannerOutput);
Expand Down
Expand Up @@ -102,7 +102,7 @@ private void copyTransForDocumentLocale(HDocument document,
document = documentDAO.findById(document.getId());

// heuristic optimization
Stopwatch stopwatch = new Stopwatch().start();
Stopwatch stopwatch = Stopwatch.createStarted();
boolean hasTranslationToCopy = true;
if (options.getDocIdMismatchAction() ==
HCopyTransOptions.ConditionRuleAction.REJECT) {
Expand Down
Expand Up @@ -81,7 +81,7 @@ public class CopyVersionServiceImpl implements CopyVersionService {
private ZanataIdentity identity;

// Stop watch for textFlow and target copy process
private Stopwatch copyTfAndTftStopWatch = new Stopwatch();
private Stopwatch copyTfAndTftStopWatch = Stopwatch.createUnstarted();

@Override
public void copyVersion(@Nonnull String projectSlug,
Expand All @@ -102,7 +102,7 @@ public void copyVersion(@Nonnull String projectSlug,
prepareCopyVersionHandle(version, taskHandleOpt.get());
}

Stopwatch overallStopwatch = new Stopwatch().start();
Stopwatch overallStopwatch = Stopwatch.createStarted();
log.info("copy version start: copy {} to {}",
projectSlug + ":" + versionSlug, projectSlug + ":"
+ newVersionSlug);
Expand Down
Expand Up @@ -185,7 +185,7 @@ private List<ValidationId> getValidationIds(HProjectIteration version,
public boolean runDocValidations(Long hDocId,
List<ValidationId> validationIds, LocaleId localeId) {
log.debug("Start runDocValidations {}", hDocId);
Stopwatch stopwatch = new Stopwatch().start();
Stopwatch stopwatch = Stopwatch.createStarted();

HDocument hDoc = documentDAO.findById(hDocId, false);
boolean hasError = documentHasWarningOrError(hDoc, validationIds, localeId);
Expand All @@ -197,7 +197,7 @@ public boolean runDocValidations(Long hDocId,
public boolean runDocValidationsWithServerRules(HDocument hDoc,
LocaleId localeId) {
log.debug("Start runDocValidationsWithServerRules {}", hDoc.getId());
Stopwatch stopwatch = new Stopwatch().start();
Stopwatch stopwatch = Stopwatch.createStarted();

List<ValidationId> validationIds =
getValidationIds(hDoc.getProjectIteration(), State.Warning,
Expand Down Expand Up @@ -229,7 +229,7 @@ public List<HTextFlow> filterHasWarningOrErrorTextFlow(
List<HTextFlow> textFlows, List<ValidationId> validationIds,
LocaleId localeId, int startIndex, int maxSize) {
log.debug("Start filter {} textFlows", textFlows.size());
Stopwatch stopwatch = new Stopwatch().start();
Stopwatch stopwatch = Stopwatch.createStarted();

List<HTextFlow> result = new ArrayList<HTextFlow>();

Expand Down
101 changes: 0 additions & 101 deletions zanata-war/src/main/java/org/zanata/ui/ColumnSort.java

This file was deleted.

0 comments on commit 3975476

Please sign in to comment.