From 411a62d3e0774f1a2395d642a707af420a44c91e Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 11 Jan 2024 07:52:49 +0300 Subject: [PATCH] #144 aspects 0.25.1 --- .github/workflows/codecov.yml | 1 + pom.xml | 2 +- src/test/java/org/xembly/DirectivesTest.java | 5 ++--- src/test/java/org/xembly/prof/DirectivesProfTest.java | 5 ++--- src/test/java/org/xembly/prof/XemblerProfTest.java | 5 ++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index f5e97af..f256493 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -22,5 +22,6 @@ jobs: - run: mvn install -Pjacoco - uses: codecov/codecov-action@v4.0.0-beta.3 with: + token: ${{ secrets.CODECOV_TOKEN }} file: ./target/site/jacoco/jacoco.xml fail_ci_if_error: true diff --git a/pom.xml b/pom.xml index 22af0c6..1d78751 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE. com.jcabi jcabi-aspects - 0.24.1 + 0.25.1 test diff --git a/src/test/java/org/xembly/DirectivesTest.java b/src/test/java/org/xembly/DirectivesTest.java index 2fc15a1..a217aeb 100644 --- a/src/test/java/org/xembly/DirectivesTest.java +++ b/src/test/java/org/xembly/DirectivesTest.java @@ -29,7 +29,6 @@ */ package org.xembly; -import com.jcabi.aspects.Tv; import com.jcabi.immutable.ArrayMap; import com.jcabi.matchers.XhtmlMatchers; import com.jcabi.xml.XMLDocument; @@ -223,7 +222,7 @@ void addsElementsCaseSensitively() throws Exception { @Test void convertsToString() { final Directives dirs = new Directives(); - for (int idx = 0; idx < Tv.TEN; ++idx) { + for (int idx = 0; idx < 10; ++idx) { dirs.add("HELLO"); } MatcherAssert.assertThat( @@ -273,7 +272,7 @@ void prefixesItemsWithNamespaces() throws Exception { @Test void acceptsFromMultipleThreads() throws Exception { final Directives dirs = new Directives().add("mt6"); - final int tasks = Tv.FIFTY; + final int tasks = 50; new LengthOf( new Threads<>( tasks / 10, diff --git a/src/test/java/org/xembly/prof/DirectivesProfTest.java b/src/test/java/org/xembly/prof/DirectivesProfTest.java index 551b3f2..3c33b15 100644 --- a/src/test/java/org/xembly/prof/DirectivesProfTest.java +++ b/src/test/java/org/xembly/prof/DirectivesProfTest.java @@ -30,7 +30,6 @@ package org.xembly.prof; import com.jcabi.aspects.Loggable; -import com.jcabi.aspects.Tv; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; @@ -46,9 +45,9 @@ final class DirectivesProfTest { @Test @SuppressWarnings("PMD.InsufficientStringBufferDeclaration") void parsesLongProgram() { - final StringBuilder program = new StringBuilder(Tv.THOUSAND) + final StringBuilder program = new StringBuilder(1000) .append("ADD 'root';"); - for (int idx = 0; idx < Tv.TEN * Tv.THOUSAND; ++idx) { + for (int idx = 0; idx < 10_000; ++idx) { program.append("XPATH '/root'; ADDIF 'node';SET '") .append(idx).append("'; ADD 'x'; REMOVE;"); } diff --git a/src/test/java/org/xembly/prof/XemblerProfTest.java b/src/test/java/org/xembly/prof/XemblerProfTest.java index 505ea57..5562060 100644 --- a/src/test/java/org/xembly/prof/XemblerProfTest.java +++ b/src/test/java/org/xembly/prof/XemblerProfTest.java @@ -30,7 +30,6 @@ package org.xembly.prof; import com.jcabi.aspects.Loggable; -import com.jcabi.aspects.Tv; import com.jcabi.matchers.XhtmlMatchers; import javax.xml.parsers.DocumentBuilderFactory; import org.hamcrest.MatcherAssert; @@ -49,9 +48,9 @@ final class XemblerProfTest { @Test @SuppressWarnings("PMD.InsufficientStringBufferDeclaration") void modifiesDom() throws Exception { - final StringBuilder program = new StringBuilder(Tv.THOUSAND) + final StringBuilder program = new StringBuilder(1000) .append("ADD 'root';"); - for (int idx = 0; idx < Tv.FIFTY * Tv.THOUSAND; ++idx) { + for (int idx = 0; idx < 50_000; ++idx) { program.append( "XPATH '/root'; ADDIF 'node';ADD 'temp'; REMOVE;SET '" ).append(idx).append("';");