Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.2.1
    • test
    • Fedora 27, clean install, openjdk version "1.8.0_151"

    Description

      After I run mvn test, I get this fail:
      Failed tests: testPwdCharset(org.mariadb.jdbc.PasswordEncodingTest): must have not have failed for charsetName=UTF-8 which is java default

      ```
      testPwdCharset(org.mariadb.jdbc.PasswordEncodingTest) Time elapsed: 0.02 sec <<< FAILURE!
      java.lang.AssertionError: must have not have failed for charsetName=UTF-8 which is java default
      at org.junit.Assert.fail(Assert.java:88)
      at org.mariadb.jdbc.PasswordEncodingTest.testPwdCharset(PasswordEncodingTest.java:91)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
      ```

      Attachments

        Activity

          jjanco Jakub Janco created issue -
          diego dupin Diego Dupin made changes -
          Field Original Value New Value
          Fix Version/s 2.2.1 [ 22802 ]
          diego dupin Diego Dupin added a comment -

          That's probably just due to missing FLUSH PRIVILEGES :

          I've added commit https://github.com/MariaDB/mariadb-connector-j/commit/be7de9aa924d17547efe18023fc9e765b0cb6da3 to develop branch.
          Could you give a try?

          diego dupin Diego Dupin added a comment - That's probably just due to missing FLUSH PRIVILEGES : I've added commit https://github.com/MariaDB/mariadb-connector-j/commit/be7de9aa924d17547efe18023fc9e765b0cb6da3 to develop branch. Could you give a try?
          diego dupin Diego Dupin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jjanco Jakub Janco added a comment -

          Didnt help:
          Failed tests: testPwdCharset(org.mariadb.jdbc.PasswordEncodingTest): must have not have failed for charsetName=UTF-8 which is java default

          jjanco Jakub Janco added a comment - Didnt help: Failed tests: testPwdCharset(org.mariadb.jdbc.PasswordEncodingTest): must have not have failed for charsetName=UTF-8 which is java default
          diego dupin Diego Dupin added a comment -

          I'll continue investigate this so.
          Can you indicate which java implementation you use, Oracle / openJDK / IBM ... ?

          diego dupin Diego Dupin added a comment - I'll continue investigate this so. Can you indicate which java implementation you use, Oracle / openJDK / IBM ... ?
          jjanco Jakub Janco added a comment - - edited

          $ java -version
          openjdk version "1.8.0_151"
          OpenJDK Runtime Environment (build 1.8.0_151-b12)
          OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
          

          jjanco Jakub Janco added a comment - - edited $ java -version openjdk version "1.8.0_151" OpenJDK Runtime Environment (build 1.8.0_151-b12) OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
          jjanco Jakub Janco made changes -
          Environment Fedora 27, clean install, java sdk 1.8 Fedora 27, clean install, openjdk version "1.8.0_151"
          diego dupin Diego Dupin added a comment -

          Tried using Fedora 27 and openjdk version "1.8.0_151" without issue.
          (using another existing MariaDB 10.3 server)
          Can you describe server version and global configuration (the only reason i would imagine this error is using init commands like @@init_connect forcing connection to use some specific charset) ?

          diego dupin Diego Dupin added a comment - Tried using Fedora 27 and openjdk version "1.8.0_151" without issue. (using another existing MariaDB 10.3 server) Can you describe server version and global configuration (the only reason i would imagine this error is using init commands like @@init_connect forcing connection to use some specific charset) ?
          diego dupin Diego Dupin added a comment -

          problem identified. The test has been corrected.

          diego dupin Diego Dupin added a comment - problem identified. The test has been corrected.
          diego dupin Diego Dupin made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          jjanco Jakub Janco added a comment -

          I'm using clean/default installation of mariadb in Fedora.
          It is still failing.

          $ cat /etc/my.cnf
          #
          # This group is read both both by the client and the server
          # use it for options that affect everything
          #
          [client-server]
           
          #
          # This group is read by the server
          #
          [mysqld]
          # Disabling symbolic-links is recommended to prevent assorted security risks
          symbolic-links=0
           
          #
          # include all files from the config directory
          #
          !includedir /etc/my.cnf.d
          

          $ cat /etc/my.cnf.d/mariadb-server.cnf 
          #
          # These groups are read by MariaDB server.
          # Use it for options that only the server (but not clients) should see
          #
          # See the examples of server my.cnf files in /usr/share/mysql/
          #
           
          # this is read by the standalone daemon and embedded servers
          [server]
           
          # this is only for the mysqld standalone daemon
          # Settings user and group are ignored when systemd is used.
          # If you need to run mysqld under a different user or group,
          # customize your systemd unit file for mysqld/mariadb according to the
          # instructions in http://fedoraproject.org/wiki/Systemd
          [mysqld]
          datadir=/var/lib/mysql
          socket=/var/lib/mysql/mysql.sock
          log-error=/var/log/mariadb/mariadb.log
          pid-file=/run/mysqld/mariadb.pid
           
           
          #
          # * Galera-related settings
          #
          [galera]
          # Mandatory settings
          #wsrep_on=ON
          #wsrep_provider=
          #wsrep_cluster_address=
          #binlog_format=row
          #default_storage_engine=InnoDB
          #innodb_autoinc_lock_mode=2
          #
          # Allow server to accept connections on all interfaces.
          #
          #bind-address=0.0.0.0
          #
          # Optional setting
          #wsrep_slave_threads=1
          #innodb_flush_log_at_trx_commit=0
           
          # this is only for embedded server
          [embedded]
           
          # This group is only read by MariaDB servers, not by MySQL.
          # If you use the same .cnf file for MySQL and MariaDB,
          # you can put MariaDB-only options here
          [mariadb]
           
          # This group is only read by MariaDB-10.1 servers.
          # If you use the same .cnf file for MariaDB of different versions,
          # use this group for options that older servers don't understand
          [mariadb-10.1]
          

          jjanco Jakub Janco added a comment - I'm using clean/default installation of mariadb in Fedora. It is still failing. $ cat /etc/my.cnf # # This group is read both both by the client and the server # use it for options that affect everything # [client-server]   # # This group is read by the server # [mysqld] # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0   # # include all files from the config directory # !includedir /etc/my.cnf.d $ cat /etc/my.cnf.d/mariadb-server.cnf # # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # # See the examples of server my.cnf files in /usr/share/mysql/ #   # this is read by the standalone daemon and embedded servers [server]   # this is only for the mysqld standalone daemon # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mysqld/mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mysqld/mariadb.pid     # # * Galera-related settings # [galera] # Mandatory settings #wsrep_on=ON #wsrep_provider= #wsrep_cluster_address= #binlog_format=row #default_storage_engine=InnoDB #innodb_autoinc_lock_mode=2 # # Allow server to accept connections on all interfaces. # #bind-address=0.0.0.0 # # Optional setting #wsrep_slave_threads=1 #innodb_flush_log_at_trx_commit=0   # this is only for embedded server [embedded]   # This group is only read by MariaDB servers, not by MySQL. # If you use the same .cnf file for MySQL and MariaDB, # you can put MariaDB-only options here [mariadb]   # This group is only read by MariaDB-10.1 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand [mariadb-10.1]
          diego dupin Diego Dupin made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Stalled [ 10000 ]
          diego dupin Diego Dupin added a comment - - edited

          issue reproduced, default configuration on fedora has anonymous user ( ''@'localhost' )
          the test doesn't work when an anonymous user is present, because it will be preferred to '%' users.

          Test is canceled when anonymous user is present,
          (running mysql_secure_installation ask to delete this user / or it can be deleted using DROP USER ''@'localhost'

          diego dupin Diego Dupin added a comment - - edited issue reproduced, default configuration on fedora has anonymous user ( ''@'localhost' ) the test doesn't work when an anonymous user is present, because it will be preferred to '%' users. Test is canceled when anonymous user is present, (running mysql_secure_installation ask to delete this user / or it can be deleted using DROP USER ''@'localhost'
          diego dupin Diego Dupin added a comment -

          closing now since reproduced and correction solves the issue.

          diego dupin Diego Dupin added a comment - closing now since reproduced and correction solves the issue.
          diego dupin Diego Dupin made changes -
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          jjanco Jakub Janco added a comment -

          Thanks, this solves the issue.
          Maybe some note or another fail message would be useful for others.

          Results :
           
          Tests run: 983, Failures: 0, Errors: 0, Skipped: 83
          

          jjanco Jakub Janco added a comment - Thanks, this solves the issue. Maybe some note or another fail message would be useful for others. Results :   Tests run: 983, Failures: 0, Errors: 0, Skipped: 83
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 84203 ] MariaDB v4 [ 135039 ]

          People

            diego dupin Diego Dupin
            jjanco Jakub Janco
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.