1 2 3 Previous Next 33 Replies Latest reply on Jun 14, 2004 10:36 AM by spiritualmechanic Go to original post
      • 15. Re: TODO: (post M1)

        Okay, I have the code written. I need to jar it all together and do some initial testing. Once I have the basic structure working, I'm going to figure out some unit tests, etc.

        So here's the order:

        1. JCA 1.0 with grabbing session from JNDI tree. I want to make sure my theory is correct about creating the new session.
        2. Once the structure seems to be okay, pass the correct user parameters/properties to a new session, if we need to do that.
        3. Find points where we can use JMX for configuration parameters, whether they'll be new/current MBeans, I'm not sure yet.


        Steve

        • 16. Re: TODO: (post M1)
          acoliver

          disregard, looks like you answered your own questions. :-)

          • 17. Re: TODO: (post M1)

            Okay, I have the adapter deploying. I'm going to do some tests and then I'll upload it as a patch after I feel comfortable with initial use.

            After that, tests!

            Steve

            • 18. Re: TODO: (post M1)
              acoliver

              Don't commit to head until after I branch for the M1 release.

              • 19. Re: TODO: (post M1)
                acoliver

                Hey Steve. I put a patch page: http://jboss.org/wiki/Wiki.jsp?page=MailServicesPatches

                Send it on through! Remeber the nice and gooey unit tests :-)

                • 20. Re: TODO: (post M1)

                  I'm testing now, actually. I'm going somewhat methodically through the JBossCX code so that I can understand it the way I really need to.

                  You want GUI tests, or gooey tests? :D I'm not sure how long this will take, hopefully not too long. I need to set up a proper JUnit environment for myself as well. That shouldn't take too long.

                  • 21. Re: TODO: (post M1)

                    One question:

                    Do you just use JUnit tests, or do you guys ever use Cactus? The reason I ask is because JCA needs the container (duh, you know this.)

                    The *real* reason I ask is because I see in the Mail tests, you have some sort of TestServer. Is this a common way of doing things, or is this something you (Andy) started doing?

                    Obviously, I can do whatever you prefer, so I'll plan to start figuring out what exactly I need to set up. I think kab is still figuring out some jndi.properties stuff, so I'll probably need to use that.

                    • 22. Re: TODO: (post M1)
                      kabirkhan

                      Yes, still trying to figure out the jndi stuff. I've kind of hit a brick wall though, so it might be a while before I get it sorted.

                      • 23. Re: TODO: (post M1)

                        I'm trying to test my JCA adapter, and for the life of me I can't get "java:/MailDS" to be retrieved. Is that even exposed on the listener? I'm beginning to think it's not.

                        I can get "jmx/rmi/RMIAdapter", though.

                        So anyways, I'm starting to set up my unit tests. It looks like in the current tests a small JMX server is created, then the Mail MBeans are attached, and then you start testing.

                        Should I try binding my JCA adapter programmatically (ctx.bind) to do testing? Or should I just use some cactus tests to test in-container?

                        • 24. Re: TODO: (post M1)
                          kabirkhan

                           

                          So anyways, I'm starting to set up my unit tests. It looks like in the current tests a small JMX server is created, then the Mail MBeans are attached, and then you start testing.


                          Yep, and MBeans the MailServices depend on are defined in depends-service.xml.

                          If you like I could apply the patch you uploaded and try to help out getting you started with the tests since (at least I thought so) they are quite hard to get to grips with.

                          • 25. Re: TODO: (post M1)

                            Yeah it's probably not *real* hard, but there definitely is a learning curve between trusting run.bat and bootstrapping your own. But this is stuff I've always wanted to learn.

                            If Andy thinks uploading the path is okay, that'd be fine with me. I don't want anyone to make a special excuse for me on the "no patches without unit tests" rule. I don't mind learning the hard way, that way I won't forget as easy.

                            • 26. Re: TODO: (post M1)

                              Ah ha! I got a super-basic server up and running. I took out all the JBossMQ stuff.

                              I think (and I may be wrong) that I want to try to get a minimal relay server going. This should require:

                              1. Mail Service (JavaMail client stuff)
                              2. The JCA Mail
                              3. Some of the mail stuff.
                              4. I'm not sure if we'd want mail storage or not for a basic mail relay server. If so, include all the MQ stuff. If not, maybe we can get away without it. Although we may still be using at least one MessageBean.



                              • 27. Re: TODO: (post M1)
                                acoliver

                                I think you're making this harder than it is. We don't want to start up everything, but don't go too far with it either.

                                Forget the relay server for now, just write a simple mail listener that puts it in the strings for your unit test and test that what you expect gets to the mail listener.

                                On Cactus: pppppptttttppppp. Its chief developer is Mr. "Agile Outsourcing"

                                Our unit tests at this point should just test the components work and some basic interaction. Later we'll add more sophisticated tests for end-end testing and multiple setups (relay, multiple relay, etc etc)

                                Its totally okay to upload patches that don't have unit tests, we just shouldn't apply them in CVS.

                                • 28. Re: TODO: (post M1)

                                  I'm not really working on the relay server right now. I'm just trying to test the JCA Mail stuff in-container. Perhaps I'm making things more difficult than they really are. I'm just trying to:

                                  1. Start up JBoss
                                  2. Init the JNDI service.
                                  3. Init the JCA service.
                                  4. Bind JCAMail to JNDI.
                                  5. Test JCAMail.

                                  Tha'ts really it. I think I'm getting fairly close. Things really are making more sense. I'm just kind of slow sometimes :D

                                  • 29. Re: TODO: (post M1)

                                    Okay, I have the JNDI service up and running, so I'm working on init/binding the JCA service. If I can I'd like to document all the necessary steps and explain what's going on, once I get everything up and running.