FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[fix/oracle]: service name is XE, not xe. by pmpetit · Pull Request #214 · testcontainers/testcontainers-python · GitHub

[fix/oracle]: service name is XE, not xe. - #214

Closed
pmpetit wants to merge 1 commit into
testcontainers:mainfrom
pmpetit:fix/oracle_service_name
Closed

[fix/oracle]: service name is XE, not xe.#214
pmpetit wants to merge 1 commit into
testcontainers:mainfrom
pmpetit:fix/oracle_service_name

Conversation

pmpetit commented May 11, 2022
edited
Loading

Copy link
Copy Markdown

testing always return "ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor"
it is because the service is names "XE".

see this command:

root@a09a1d6ea6c3:/# su - oracle
oracle@a09a1d6ea6c3:~$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-MAY-2022 11:41:15

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                11-MAY-2022 11:40:49
Uptime                    0 days 0 hr. 0 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/a09a1d6ea6c3/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a09a1d6ea6c3)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a09a1d6ea6c3)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
oracle@a09a1d6ea6c3:~$

the service name is "XE", not "xe".
so if you want to connect using (in testcontainers/core/generic.py)
line 48

        if db_name:
            url += '/' + db_name

it means that you want to connect using a service name, so get_connection_url must return "XE" as service_name

if it were :

        if db_name:
            url += ': + db_name

then you could use "xe" (the db_name). but it is not the case

pmpetit changed the title service name in this image is XE, not xe. [fix/oracle]: service name is XE, not xe. May 11, 2022

codecov-commenter commented May 11, 2022
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.56%. Comparing base (99a3252) to head (c0f95ab).
Report is 333 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #214   +/-   ##
=======================================
  Coverage   86.56%   86.56%           
=======================================
  Files          27       27           
  Lines         722      722           
  Branches       65       65           
=======================================
  Hits          625      625           
  Misses         76       76           
  Partials       21       21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

Thanks for the fix. Would you mind adding a test demonstrating what behavior this change fixes (the existing tests seem to pass fine without the change in db_name)?

alexanderankin added the 👥 community feat feature but its a community module so we wont bump tc core for it label Mar 26, 2024

Copy link
Copy Markdown
Member

@pmpetit i believe this change is no longer necessary in oracle-free which we have moved our implementation to since the merge of #363 - if its still an issue, please reopen 👍

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👥 community feat feature but its a community module so we wont bump tc core for it 📦 package: oracle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL