Re: is it possible to run oracle server as non-root, non-system process?

From: ted y <teddyyyy123_at_gmail.com>
Date: Wed, 24 Sep 2014 01:05:56 -0700 (PDT)
Message-ID: <2afac4d0-3885-467b-8368-f6aecc2ab307_at_googlegroups.com>


another case where we absolutely can't use mock is the case of very complex production schemas and data. in such cases, the only way you could prepare the data and schema for test, is to grab a snapshot from production, so you need an oracle db for testing. but a single "QA runway box" golden dataset is susceptible to being modified unintendedly, or losing network connection. so the only surefire way to junit test, is to pack the golden dataset as part of the source code, and ship the oracle db, together with the golden data, as part of the test code  

On Wednesday, September 24, 2014 12:59:07 AM UTC-7, ted y wrote:
> Thanks Robert. your comments are very right. I'm glad you understood my approach.
>
>
>
> yes, the start up time would be high. but with a bit of careful coding in my wrapper class for my custom base class that uses this oracle setup, I can let all the junit cases share the same oracle instance, and not starting a new one every time. that way the cost is tolerable, I'm not terribly concerned with the speed to run my junit.
>
>
>

> compared to the headache to cope with the difference between oracle sql flavor / features and that of hsqldb/sqlite3, the time cost is much less of a concern. if I could setup oracle for my test, I don't need to worry about our QA "runway" oracle boxes going down or network cut off. hsqldb offers a "Oracle flavor/mode" but it's far from even a satisfactory emulation, it lacks many oracle functions.
>

>
>
> granted , testing db-related java code is a pain, I tried to search around for an established, systematic, sound approach, but haven't seen any on the web or through my work.
>
>
>
> thanks
>
> yang
>
>
>
> On Tuesday, September 23, 2014 11:50:07 PM UTC-7, Robert Klemme wrote:
>
> > On 23.09.2014 18:43, ted y wrote:
>
> >
>
> >
>
> >
>
> > > I did NOT create the new user accounts and groups , since my very
>
> >
>
> > > goal is to run this server as normal user , when the user wants to
>
> >
>
> > > run a junit (which needs an oracle instance)
>
> >
>
> >
>
> >
>
> > That is a very bad idea(TM). The overhead to start an Oracle instance
>
> >
>
> > per unit test is much too high. Plus, you would want a private instance
>
> >
>
> > for each test to avoid interference with each other. So that would mean
>
> >
>
> > to not only _start_ an instance on the fly but also to configure it on
>
> >
>
> > the fly.
>
> >
>
> >
>
> >
>
> > I think a more successful approach is to look into using different
>
> >
>
> > schemas for that. Even that is still a bit costly but more manageable
>
> >
>
> > than the original approach.
>
> >
>
> >
>
> >
>
> > Kind regards
>
> >
>
> >
>
> >
>
> > robert
Received on Wed Sep 24 2014 - 10:05:56 CEST

Original text of this message