You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2020/06/04 20:57:54 UTC

[openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

This is an automated email from the ASF dual-hosted git repository.

gerdogdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 6de6f20  adding a test for testing the Typed annotation with wrong value
6de6f20 is described below

commit 6de6f200f0817fc8028017800e5fdcf490496a9a
Author: Gurkan Erdogdu <cg...@gmail.com>
AuthorDate: Thu Jun 4 23:57:26 2020 +0300

    adding a test for testing the Typed annotation with wrong value
---
 .../webbeans/test/injection/typed/NotInTyped.java  | 26 +++++++++++++++++
 .../test/injection/typed/NotInTypedTest.java       | 34 ++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
new file mode 100644
index 0000000..d5d265e
--- /dev/null
+++ b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.test.injection.typed;
+
+import javax.enterprise.inject.Typed;
+
+@Typed(Raven.class)
+public class NotInTyped implements Bird{
+    
+}
diff --git a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
new file mode 100644
index 0000000..97cbdb3
--- /dev/null
+++ b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.test.injection.typed;
+
+import org.apache.webbeans.exception.WebBeansConfigurationException;
+import org.apache.webbeans.test.AbstractUnitTest;
+import org.junit.Test;
+
+public class NotInTypedTest extends AbstractUnitTest
+{
+
+    @Test(expected = WebBeansConfigurationException.class)
+    public void testNotInTypedMustThrowException()
+    {
+        startContainer(Bird.class, Raven.class, NotInTyped.class);
+    }
+
+}


Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Le ven. 5 juin 2020 à 15:28, Gurkan Erdogdu <cg...@gmail.com> a
écrit :

> >
> > I don't want we start to have this pattern of importing test from
> elsewhere
>
> I totally agree with that. Let me explain why I added this test case:
> When I was trying to pass old TCK suites year ago, I generally created the
> tests for exceptional case. Now, I have been reading the updated
> Specification Document and again adapting to our code base (Happy to
> remember nearly all of them I wrote :))
> When I read Typed exception section, looked to source code whether to have
> any test for it or not, and wrote to cover it.
>
> In the meantime, when I want to adapt any open source project, I always
> start to contribute with test cases. This is really useful practice which I
> learn in my 20 years of software engineering experience.
>

Maybe it works for us who are used of OSS but all feedbacks of people new
to the OSS I met was "what, I want to help and you make me do your bad
tasks" (indeed that's my words but the meaning is there ;)).
And I have to admit I understand, you test the code you write so if you ask
somebody to write test, you somehow ask him to do your work even if tests
are a way to play with a project but it can also be done in a sandbox.
On project level I think we should stick to try increasing the coverage
(tests are only there for it at the end) and try to helps people to play
with OWB - potentially with some che or docker image setups.


>
> Warm Regards.
> Gurkan
>
> On Fri, Jun 5, 2020 at 4:20 PM Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> > Le ven. 5 juin 2020 à 15:02, Gurkan Erdogdu <cg...@gmail.com> a
> > écrit :
> >
> > > >
> > > > ..... you basically did nothing for the project until you increase
> test
> > > > covering - and we are not that bad on that already + it can be hard
> ot
> > > > review tck
> > > > suite upfront. ....
> > > >
> > > Hey Romain
> > > What do you mean by that? I feel like some yelling :)
> > >
> >
> > Feared it looked so but clearly not ;) (#mails :()
> >
> >
> > > I have been a committer and PMC member since founding the project and
> > again
> > > would like to help. Contributions are always welcome for community
> > projects
> > > and the most quick adaptation to the any open source project is
> starting
> > > with writing tests and even documentation.
> > > As you look at the tests in webbeans-impl, you will see hundreds of
> tests
> > > which were written by us to well cover the source code. We need to
> > continue
> > > for adding more tests.
> > >
> >
> > I agree, where I disagree is about adding tests by duplicating existing
> > ones. TCK are parts of our test coverage, that's a fact so we must
> consider
> > there are there.
> > If you fear - as Mark and it is a valid point - that some disappear on
> the
> > spec, we should test on all versions (which should be BTW since it is how
> > spec works) and just exclude the ones which were wrong (TCK have bugs too
> > ;)).
> >
> > Don't get me wrong, If you work on a feature and need to duplicate a test
> > to work it is fine but I don't want we start to have this pattern of
> > importing test from elsewhere if we already run them, it will slow down
> our
> > build, makes our maintenance more complicated and code review more
> indirect
> > than it is already IMHO.
> >
> >
> > > Warm regards.
> > > Gurkan
> > >
> > >
> > > On Fri, Jun 5, 2020 at 1:05 PM Romain Manni-Bucau <
> rmannibucau@gmail.com
> > >
> > > wrote:
> > >
> > > > I'm not fan of that cause we will be really slower, take the time tck
> > > > module runs (it is not fast even if we are faster than most impl) and
> > > this
> > > > is what we should duplicate if we respect that paradigm.
> > > > If the "fear" is to loose test with new versions we can have profiles
> > for
> > > > all versions with some excludes when things changed and just run it
> on
> > > > jenkins, then this makes useful to duplicate anything, no?
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > <
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > >
> > > >
> > > >
> > > > Le ven. 5 juin 2020 à 11:48, Mark Struberg <struberg@yahoo.de.invalid
> >
> > a
> > > > écrit :
> > > >
> > > > > Well, I'm with Gurkan here. The more tests we have internally the
> > > better.
> > > > > TCK tests are fine, but if we move to a new TCK version then we
> might
> > > > miss
> > > > > something.
> > > > > The TCKs are also not always perfect.
> > > > > We start OWB so fast that it doesn't make much difference.
> > > > >
> > > > > LieGrue,
> > > > > strub
> > > > >
> > > > >
> > > > > > Am 05.06.2020 um 11:39 schrieb Romain Manni-Bucau <
> > > > rmannibucau@gmail.com
> > > > > >:
> > > > > >
> > > > > > Well, it is also bad to x2 the test time cause we duplicated the
> > TCK.
> > > > > > TCK are part of our test coverage and we must consider it as
> fully
> > > part
> > > > > of
> > > > > > our harnessing IMHO, in particular for such simple tests, this is
> > > why I
> > > > > > think we shouldnt generalize this practise.
> > > > > >
> > > > > > You last comment also makes me realizing we don't have an
> > onboarding
> > > > page
> > > > > > on our website (we just have
> > > > > https://openwebbeans.apache.org/community.html
> > > > > > right?).
> > > > > > I'm not sure writing a test is welcoming, in particular we our
> > > testing
> > > > > > stack.
> > > > > > I also know as a starter it is very frustrating to do so because
> > you
> > > > > > basically did nothing for the project until you increase test
> > > covering
> > > > -
> > > > > > and we are not that bad on that already + it can be hard ot
> review
> > > tck
> > > > > > suite upfront. It is also something you can trivially do on your
> > > github
> > > > > (or
> > > > > > locally) to play with the project these days.
> > > > > > We should probably try to define some guidelines around how to
> > help.
> > > > > > Out of my head I know doc can be something help would be very
> > > welcomed,
> > > > > SPI
> > > > > > doc can be enhanced a lot in particular, ecosystem integrations
> and
> > > doc
> > > > > are
> > > > > > things we can be better (for instance it is not obvious we run on
> > > > > graalvm -
> > > > > > even if there are some limitations). And we should probably
> > flag/tag
> > > > some
> > > > > > jira ticket as "beginner-friendly" (or a better named tag). This
> > > > sounds a
> > > > > > better welcoming path to me, like "contribute something real" and
> > > "make
> > > > > the
> > > > > > project move forward".
> > > > > >
> > > > > > wdyt?
> > > > > >
> > > > > > Romain Manni-Bucau
> > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > > > <
> > > > >
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > > >
> > > > > >
> > > > > >
> > > > > > Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <
> > > cgurkanerdogdu@gmail.com>
> > > > a
> > > > > > écrit :
> > > > > >
> > > > > >> One more thing: All new incomers to the project are invited to
> > start
> > > > > with
> > > > > >> adding a simple test like this.
> > > > > >>
> > > > > >> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <
> > > > > cgurkanerdogdu@gmail.com>
> > > > > >> wrote:
> > > > > >>
> > > > > >>> Hey Romain
> > > > > >>> In fact, this is our internal test suite not the TCK. So, it
> is a
> > > > good
> > > > > >>> idea to have internal tests to cover lots of spec requirements.
> > > > > >>> Regards.
> > > > > >>> Gurkan
> > > > > >>>
> > > > > >>> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <
> > > > > rmannibucau@gmail.com
> > > > > >>>
> > > > > >>> wrote:
> > > > > >>>
> > > > > >>>> For what is worth: this is tested in TCK already
> > > > > >>>> (RestrictedManagedBeanTest I
> > > > > >>>> think) in an user facing way - i e CDI exception, not our
> > internal
> > > > OWB
> > > > > >> one
> > > > > >>>> which does not have to be stable.
> > > > > >>>> Don't know if we need to duplicate it - guess this one is fine
> > > cause
> > > > > >> fast
> > > > > >>>> but thought I should mention it.
> > > > > >>>>
> > > > > >>>> Romain Manni-Bucau
> > > > > >>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > >>>> <https://rmannibucau.metawerx.net/> | Old Blog
> > > > > >>>> <http://rmannibucau.wordpress.com> | Github <
> > > > > >>>> https://github.com/rmannibucau> |
> > > > > >>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > > >>>> <
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > > >>>>>
> > > > > >>>>
> > > > > >>>>
> > > > > >>>> ---------- Forwarded message ---------
> > > > > >>>> De : <ge...@apache.org>
> > > > > >>>> Date: jeu. 4 juin 2020 à 22:57
> > > > > >>>> Subject: [openwebbeans] branch master updated: adding a test
> for
> > > > > testing
> > > > > >>>> the Typed annotation with wrong value
> > > > > >>>> To: commits@openwebbeans.apache.org <
> > > > commits@openwebbeans.apache.org>
> > > > > >>>>
> > > > > >>>>
> > > > > >>>> This is an automated email from the ASF dual-hosted git
> > > repository.
> > > > > >>>>
> > > > > >>>> gerdogdu pushed a commit to branch master
> > > > > >>>> in repository
> > > https://gitbox.apache.org/repos/asf/openwebbeans.git
> > > > > >>>>
> > > > > >>>>
> > > > > >>>> The following commit(s) were added to refs/heads/master by
> this
> > > > push:
> > > > > >>>>     new 6de6f20  adding a test for testing the Typed
> annotation
> > > with
> > > > > >>>> wrong
> > > > > >>>> value
> > > > > >>>> 6de6f20 is described below
> > > > > >>>>
> > > > > >>>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> > > > > >>>> Author: Gurkan Erdogdu <cg...@gmail.com>
> > > > > >>>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
> > > > > >>>>
> > > > > >>>>    adding a test for testing the Typed annotation with wrong
> > value
> > > > > >>>> ---
> > > > > >>>> .../webbeans/test/injection/typed/NotInTyped.java  | 26
> > > > > >> +++++++++++++++++
> > > > > >>>> .../test/injection/typed/NotInTypedTest.java       | 34
> > > > > >>>> ++++++++++++++++++++++
> > > > > >>>> 2 files changed, 60 insertions(+)
> > > > > >>>>
> > > > > >>>> diff --git
> > > > > >>>>
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > > > >>>>
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > > > >>>> new file mode 100644
> > > > > >>>> index 0000000..d5d265e
> > > > > >>>> --- /dev/null
> > > > > >>>> +++
> > > > > >>>>
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > > > >>>> @@ -0,0 +1,26 @@
> > > > > >>>> +/*
> > > > > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > > > > >>>> + * or more contributor license agreements.  See the NOTICE
> file
> > > > > >>>> + * distributed with this work for additional information
> > > > > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > > > > >>>> + * to you under the Apache License, Version 2.0 (the
> > > > > >>>> + * "License"); you may not use this file except in compliance
> > > > > >>>> + * with the License.  You may obtain a copy of the License at
> > > > > >>>> + *
> > > > > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > > > > >>>> + *
> > > > > >>>> + * Unless required by applicable law or agreed to in writing,
> > > > > >>>> + * software distributed under the License is distributed on
> an
> > > > > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > > > > >>>> + * KIND, either express or implied.  See the License for the
> > > > > >>>> + * specific language governing permissions and limitations
> > > > > >>>> + * under the License.
> > > > > >>>> + */
> > > > > >>>> +package org.apache.webbeans.test.injection.typed;
> > > > > >>>> +
> > > > > >>>> +import javax.enterprise.inject.Typed;
> > > > > >>>> +
> > > > > >>>> +@Typed(Raven.class)
> > > > > >>>> +public class NotInTyped implements Bird{
> > > > > >>>> +
> > > > > >>>> +}
> > > > > >>>> diff --git
> > > > > >>>>
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > > > >>>>
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > > > >>>> new file mode 100644
> > > > > >>>> index 0000000..97cbdb3
> > > > > >>>> --- /dev/null
> > > > > >>>> +++
> > > > > >>>>
> > > > > >>>>
> > > > > >>
> > > > >
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > > > >>>> @@ -0,0 +1,34 @@
> > > > > >>>> +/*
> > > > > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > > > > >>>> + * or more contributor license agreements.  See the NOTICE
> file
> > > > > >>>> + * distributed with this work for additional information
> > > > > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > > > > >>>> + * to you under the Apache License, Version 2.0 (the
> > > > > >>>> + * "License"); you may not use this file except in compliance
> > > > > >>>> + * with the License.  You may obtain a copy of the License at
> > > > > >>>> + *
> > > > > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > > > > >>>> + *
> > > > > >>>> + * Unless required by applicable law or agreed to in writing,
> > > > > >>>> + * software distributed under the License is distributed on
> an
> > > > > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > > > > >>>> + * KIND, either express or implied.  See the License for the
> > > > > >>>> + * specific language governing permissions and limitations
> > > > > >>>> + * under the License.
> > > > > >>>> + */
> > > > > >>>> +package org.apache.webbeans.test.injection.typed;
> > > > > >>>> +
> > > > > >>>> +import
> > > > org.apache.webbeans.exception.WebBeansConfigurationException;
> > > > > >>>> +import org.apache.webbeans.test.AbstractUnitTest;
> > > > > >>>> +import org.junit.Test;
> > > > > >>>> +
> > > > > >>>> +public class NotInTypedTest extends AbstractUnitTest
> > > > > >>>> +{
> > > > > >>>> +
> > > > > >>>> +    @Test(expected = WebBeansConfigurationException.class)
> > > > > >>>> +    public void testNotInTypedMustThrowException()
> > > > > >>>> +    {
> > > > > >>>> +        startContainer(Bird.class, Raven.class,
> > > NotInTyped.class);
> > > > > >>>> +    }
> > > > > >>>> +
> > > > > >>>> +}
> > > > > >>>>
> > > > > >>>
> > > > > >>>
> > > > > >>> --
> > > > > >>> Gurkan Erdogdu
> > > > > >>> http://gurkanerdogdu.blogspot.com
> > > > > >>>
> > > > > >>
> > > > > >>
> > > > > >> --
> > > > > >> Gurkan Erdogdu
> > > > > >> http://gurkanerdogdu.blogspot.com
> > > > > >>
> > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Gurkan Erdogdu
> > > http://gurkanerdogdu.blogspot.com
> > >
> >
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Gurkan Erdogdu <cg...@gmail.com>.
>
> I don't want we start to have this pattern of importing test from elsewhere

I totally agree with that. Let me explain why I added this test case:
When I was trying to pass old TCK suites year ago, I generally created the
tests for exceptional case. Now, I have been reading the updated
Specification Document and again adapting to our code base (Happy to
remember nearly all of them I wrote :))
When I read Typed exception section, looked to source code whether to have
any test for it or not, and wrote to cover it.

In the meantime, when I want to adapt any open source project, I always
start to contribute with test cases. This is really useful practice which I
learn in my 20 years of software engineering experience.

Warm Regards.
Gurkan

On Fri, Jun 5, 2020 at 4:20 PM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> Le ven. 5 juin 2020 à 15:02, Gurkan Erdogdu <cg...@gmail.com> a
> écrit :
>
> > >
> > > ..... you basically did nothing for the project until you increase test
> > > covering - and we are not that bad on that already + it can be hard ot
> > > review tck
> > > suite upfront. ....
> > >
> > Hey Romain
> > What do you mean by that? I feel like some yelling :)
> >
>
> Feared it looked so but clearly not ;) (#mails :()
>
>
> > I have been a committer and PMC member since founding the project and
> again
> > would like to help. Contributions are always welcome for community
> projects
> > and the most quick adaptation to the any open source project is starting
> > with writing tests and even documentation.
> > As you look at the tests in webbeans-impl, you will see hundreds of tests
> > which were written by us to well cover the source code. We need to
> continue
> > for adding more tests.
> >
>
> I agree, where I disagree is about adding tests by duplicating existing
> ones. TCK are parts of our test coverage, that's a fact so we must consider
> there are there.
> If you fear - as Mark and it is a valid point - that some disappear on the
> spec, we should test on all versions (which should be BTW since it is how
> spec works) and just exclude the ones which were wrong (TCK have bugs too
> ;)).
>
> Don't get me wrong, If you work on a feature and need to duplicate a test
> to work it is fine but I don't want we start to have this pattern of
> importing test from elsewhere if we already run them, it will slow down our
> build, makes our maintenance more complicated and code review more indirect
> than it is already IMHO.
>
>
> > Warm regards.
> > Gurkan
> >
> >
> > On Fri, Jun 5, 2020 at 1:05 PM Romain Manni-Bucau <rmannibucau@gmail.com
> >
> > wrote:
> >
> > > I'm not fan of that cause we will be really slower, take the time tck
> > > module runs (it is not fast even if we are faster than most impl) and
> > this
> > > is what we should duplicate if we respect that paradigm.
> > > If the "fear" is to loose test with new versions we can have profiles
> for
> > > all versions with some excludes when things changed and just run it on
> > > jenkins, then this makes useful to duplicate anything, no?
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > <
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > >
> > >
> > >
> > > Le ven. 5 juin 2020 à 11:48, Mark Struberg <st...@yahoo.de.invalid>
> a
> > > écrit :
> > >
> > > > Well, I'm with Gurkan here. The more tests we have internally the
> > better.
> > > > TCK tests are fine, but if we move to a new TCK version then we might
> > > miss
> > > > something.
> > > > The TCKs are also not always perfect.
> > > > We start OWB so fast that it doesn't make much difference.
> > > >
> > > > LieGrue,
> > > > strub
> > > >
> > > >
> > > > > Am 05.06.2020 um 11:39 schrieb Romain Manni-Bucau <
> > > rmannibucau@gmail.com
> > > > >:
> > > > >
> > > > > Well, it is also bad to x2 the test time cause we duplicated the
> TCK.
> > > > > TCK are part of our test coverage and we must consider it as fully
> > part
> > > > of
> > > > > our harnessing IMHO, in particular for such simple tests, this is
> > why I
> > > > > think we shouldnt generalize this practise.
> > > > >
> > > > > You last comment also makes me realizing we don't have an
> onboarding
> > > page
> > > > > on our website (we just have
> > > > https://openwebbeans.apache.org/community.html
> > > > > right?).
> > > > > I'm not sure writing a test is welcoming, in particular we our
> > testing
> > > > > stack.
> > > > > I also know as a starter it is very frustrating to do so because
> you
> > > > > basically did nothing for the project until you increase test
> > covering
> > > -
> > > > > and we are not that bad on that already + it can be hard ot review
> > tck
> > > > > suite upfront. It is also something you can trivially do on your
> > github
> > > > (or
> > > > > locally) to play with the project these days.
> > > > > We should probably try to define some guidelines around how to
> help.
> > > > > Out of my head I know doc can be something help would be very
> > welcomed,
> > > > SPI
> > > > > doc can be enhanced a lot in particular, ecosystem integrations and
> > doc
> > > > are
> > > > > things we can be better (for instance it is not obvious we run on
> > > > graalvm -
> > > > > even if there are some limitations). And we should probably
> flag/tag
> > > some
> > > > > jira ticket as "beginner-friendly" (or a better named tag). This
> > > sounds a
> > > > > better welcoming path to me, like "contribute something real" and
> > "make
> > > > the
> > > > > project move forward".
> > > > >
> > > > > wdyt?
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > > <
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > >
> > > > >
> > > > >
> > > > > Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <
> > cgurkanerdogdu@gmail.com>
> > > a
> > > > > écrit :
> > > > >
> > > > >> One more thing: All new incomers to the project are invited to
> start
> > > > with
> > > > >> adding a simple test like this.
> > > > >>
> > > > >> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <
> > > > cgurkanerdogdu@gmail.com>
> > > > >> wrote:
> > > > >>
> > > > >>> Hey Romain
> > > > >>> In fact, this is our internal test suite not the TCK. So, it is a
> > > good
> > > > >>> idea to have internal tests to cover lots of spec requirements.
> > > > >>> Regards.
> > > > >>> Gurkan
> > > > >>>
> > > > >>> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <
> > > > rmannibucau@gmail.com
> > > > >>>
> > > > >>> wrote:
> > > > >>>
> > > > >>>> For what is worth: this is tested in TCK already
> > > > >>>> (RestrictedManagedBeanTest I
> > > > >>>> think) in an user facing way - i e CDI exception, not our
> internal
> > > OWB
> > > > >> one
> > > > >>>> which does not have to be stable.
> > > > >>>> Don't know if we need to duplicate it - guess this one is fine
> > cause
> > > > >> fast
> > > > >>>> but thought I should mention it.
> > > > >>>>
> > > > >>>> Romain Manni-Bucau
> > > > >>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > >>>> <https://rmannibucau.metawerx.net/> | Old Blog
> > > > >>>> <http://rmannibucau.wordpress.com> | Github <
> > > > >>>> https://github.com/rmannibucau> |
> > > > >>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > >>>> <
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > >>>>>
> > > > >>>>
> > > > >>>>
> > > > >>>> ---------- Forwarded message ---------
> > > > >>>> De : <ge...@apache.org>
> > > > >>>> Date: jeu. 4 juin 2020 à 22:57
> > > > >>>> Subject: [openwebbeans] branch master updated: adding a test for
> > > > testing
> > > > >>>> the Typed annotation with wrong value
> > > > >>>> To: commits@openwebbeans.apache.org <
> > > commits@openwebbeans.apache.org>
> > > > >>>>
> > > > >>>>
> > > > >>>> This is an automated email from the ASF dual-hosted git
> > repository.
> > > > >>>>
> > > > >>>> gerdogdu pushed a commit to branch master
> > > > >>>> in repository
> > https://gitbox.apache.org/repos/asf/openwebbeans.git
> > > > >>>>
> > > > >>>>
> > > > >>>> The following commit(s) were added to refs/heads/master by this
> > > push:
> > > > >>>>     new 6de6f20  adding a test for testing the Typed annotation
> > with
> > > > >>>> wrong
> > > > >>>> value
> > > > >>>> 6de6f20 is described below
> > > > >>>>
> > > > >>>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> > > > >>>> Author: Gurkan Erdogdu <cg...@gmail.com>
> > > > >>>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
> > > > >>>>
> > > > >>>>    adding a test for testing the Typed annotation with wrong
> value
> > > > >>>> ---
> > > > >>>> .../webbeans/test/injection/typed/NotInTyped.java  | 26
> > > > >> +++++++++++++++++
> > > > >>>> .../test/injection/typed/NotInTypedTest.java       | 34
> > > > >>>> ++++++++++++++++++++++
> > > > >>>> 2 files changed, 60 insertions(+)
> > > > >>>>
> > > > >>>> diff --git
> > > > >>>>
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > > >>>>
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > > >>>> new file mode 100644
> > > > >>>> index 0000000..d5d265e
> > > > >>>> --- /dev/null
> > > > >>>> +++
> > > > >>>>
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > > >>>> @@ -0,0 +1,26 @@
> > > > >>>> +/*
> > > > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > > > >>>> + * or more contributor license agreements.  See the NOTICE file
> > > > >>>> + * distributed with this work for additional information
> > > > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > > > >>>> + * to you under the Apache License, Version 2.0 (the
> > > > >>>> + * "License"); you may not use this file except in compliance
> > > > >>>> + * with the License.  You may obtain a copy of the License at
> > > > >>>> + *
> > > > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > > > >>>> + *
> > > > >>>> + * Unless required by applicable law or agreed to in writing,
> > > > >>>> + * software distributed under the License is distributed on an
> > > > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > > > >>>> + * KIND, either express or implied.  See the License for the
> > > > >>>> + * specific language governing permissions and limitations
> > > > >>>> + * under the License.
> > > > >>>> + */
> > > > >>>> +package org.apache.webbeans.test.injection.typed;
> > > > >>>> +
> > > > >>>> +import javax.enterprise.inject.Typed;
> > > > >>>> +
> > > > >>>> +@Typed(Raven.class)
> > > > >>>> +public class NotInTyped implements Bird{
> > > > >>>> +
> > > > >>>> +}
> > > > >>>> diff --git
> > > > >>>>
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > > >>>>
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > > >>>> new file mode 100644
> > > > >>>> index 0000000..97cbdb3
> > > > >>>> --- /dev/null
> > > > >>>> +++
> > > > >>>>
> > > > >>>>
> > > > >>
> > > >
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > > >>>> @@ -0,0 +1,34 @@
> > > > >>>> +/*
> > > > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > > > >>>> + * or more contributor license agreements.  See the NOTICE file
> > > > >>>> + * distributed with this work for additional information
> > > > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > > > >>>> + * to you under the Apache License, Version 2.0 (the
> > > > >>>> + * "License"); you may not use this file except in compliance
> > > > >>>> + * with the License.  You may obtain a copy of the License at
> > > > >>>> + *
> > > > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > > > >>>> + *
> > > > >>>> + * Unless required by applicable law or agreed to in writing,
> > > > >>>> + * software distributed under the License is distributed on an
> > > > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > > > >>>> + * KIND, either express or implied.  See the License for the
> > > > >>>> + * specific language governing permissions and limitations
> > > > >>>> + * under the License.
> > > > >>>> + */
> > > > >>>> +package org.apache.webbeans.test.injection.typed;
> > > > >>>> +
> > > > >>>> +import
> > > org.apache.webbeans.exception.WebBeansConfigurationException;
> > > > >>>> +import org.apache.webbeans.test.AbstractUnitTest;
> > > > >>>> +import org.junit.Test;
> > > > >>>> +
> > > > >>>> +public class NotInTypedTest extends AbstractUnitTest
> > > > >>>> +{
> > > > >>>> +
> > > > >>>> +    @Test(expected = WebBeansConfigurationException.class)
> > > > >>>> +    public void testNotInTypedMustThrowException()
> > > > >>>> +    {
> > > > >>>> +        startContainer(Bird.class, Raven.class,
> > NotInTyped.class);
> > > > >>>> +    }
> > > > >>>> +
> > > > >>>> +}
> > > > >>>>
> > > > >>>
> > > > >>>
> > > > >>> --
> > > > >>> Gurkan Erdogdu
> > > > >>> http://gurkanerdogdu.blogspot.com
> > > > >>>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Gurkan Erdogdu
> > > > >> http://gurkanerdogdu.blogspot.com
> > > > >>
> > > >
> > > >
> > >
> >
> >
> > --
> > Gurkan Erdogdu
> > http://gurkanerdogdu.blogspot.com
> >
>


-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Le ven. 5 juin 2020 à 15:02, Gurkan Erdogdu <cg...@gmail.com> a
écrit :

> >
> > ..... you basically did nothing for the project until you increase test
> > covering - and we are not that bad on that already + it can be hard ot
> > review tck
> > suite upfront. ....
> >
> Hey Romain
> What do you mean by that? I feel like some yelling :)
>

Feared it looked so but clearly not ;) (#mails :()


> I have been a committer and PMC member since founding the project and again
> would like to help. Contributions are always welcome for community projects
> and the most quick adaptation to the any open source project is starting
> with writing tests and even documentation.
> As you look at the tests in webbeans-impl, you will see hundreds of tests
> which were written by us to well cover the source code. We need to continue
> for adding more tests.
>

I agree, where I disagree is about adding tests by duplicating existing
ones. TCK are parts of our test coverage, that's a fact so we must consider
there are there.
If you fear - as Mark and it is a valid point - that some disappear on the
spec, we should test on all versions (which should be BTW since it is how
spec works) and just exclude the ones which were wrong (TCK have bugs too
;)).

Don't get me wrong, If you work on a feature and need to duplicate a test
to work it is fine but I don't want we start to have this pattern of
importing test from elsewhere if we already run them, it will slow down our
build, makes our maintenance more complicated and code review more indirect
than it is already IMHO.


> Warm regards.
> Gurkan
>
>
> On Fri, Jun 5, 2020 at 1:05 PM Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> > I'm not fan of that cause we will be really slower, take the time tck
> > module runs (it is not fast even if we are faster than most impl) and
> this
> > is what we should duplicate if we respect that paradigm.
> > If the "fear" is to loose test with new versions we can have profiles for
> > all versions with some excludes when things changed and just run it on
> > jenkins, then this makes useful to duplicate anything, no?
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >
> >
> >
> > Le ven. 5 juin 2020 à 11:48, Mark Struberg <st...@yahoo.de.invalid> a
> > écrit :
> >
> > > Well, I'm with Gurkan here. The more tests we have internally the
> better.
> > > TCK tests are fine, but if we move to a new TCK version then we might
> > miss
> > > something.
> > > The TCKs are also not always perfect.
> > > We start OWB so fast that it doesn't make much difference.
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > > > Am 05.06.2020 um 11:39 schrieb Romain Manni-Bucau <
> > rmannibucau@gmail.com
> > > >:
> > > >
> > > > Well, it is also bad to x2 the test time cause we duplicated the TCK.
> > > > TCK are part of our test coverage and we must consider it as fully
> part
> > > of
> > > > our harnessing IMHO, in particular for such simple tests, this is
> why I
> > > > think we shouldnt generalize this practise.
> > > >
> > > > You last comment also makes me realizing we don't have an onboarding
> > page
> > > > on our website (we just have
> > > https://openwebbeans.apache.org/community.html
> > > > right?).
> > > > I'm not sure writing a test is welcoming, in particular we our
> testing
> > > > stack.
> > > > I also know as a starter it is very frustrating to do so because you
> > > > basically did nothing for the project until you increase test
> covering
> > -
> > > > and we are not that bad on that already + it can be hard ot review
> tck
> > > > suite upfront. It is also something you can trivially do on your
> github
> > > (or
> > > > locally) to play with the project these days.
> > > > We should probably try to define some guidelines around how to help.
> > > > Out of my head I know doc can be something help would be very
> welcomed,
> > > SPI
> > > > doc can be enhanced a lot in particular, ecosystem integrations and
> doc
> > > are
> > > > things we can be better (for instance it is not obvious we run on
> > > graalvm -
> > > > even if there are some limitations). And we should probably flag/tag
> > some
> > > > jira ticket as "beginner-friendly" (or a better named tag). This
> > sounds a
> > > > better welcoming path to me, like "contribute something real" and
> "make
> > > the
> > > > project move forward".
> > > >
> > > > wdyt?
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > <
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > >
> > > >
> > > >
> > > > Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <
> cgurkanerdogdu@gmail.com>
> > a
> > > > écrit :
> > > >
> > > >> One more thing: All new incomers to the project are invited to start
> > > with
> > > >> adding a simple test like this.
> > > >>
> > > >> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <
> > > cgurkanerdogdu@gmail.com>
> > > >> wrote:
> > > >>
> > > >>> Hey Romain
> > > >>> In fact, this is our internal test suite not the TCK. So, it is a
> > good
> > > >>> idea to have internal tests to cover lots of spec requirements.
> > > >>> Regards.
> > > >>> Gurkan
> > > >>>
> > > >>> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <
> > > rmannibucau@gmail.com
> > > >>>
> > > >>> wrote:
> > > >>>
> > > >>>> For what is worth: this is tested in TCK already
> > > >>>> (RestrictedManagedBeanTest I
> > > >>>> think) in an user facing way - i e CDI exception, not our internal
> > OWB
> > > >> one
> > > >>>> which does not have to be stable.
> > > >>>> Don't know if we need to duplicate it - guess this one is fine
> cause
> > > >> fast
> > > >>>> but thought I should mention it.
> > > >>>>
> > > >>>> Romain Manni-Bucau
> > > >>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > >>>> <https://rmannibucau.metawerx.net/> | Old Blog
> > > >>>> <http://rmannibucau.wordpress.com> | Github <
> > > >>>> https://github.com/rmannibucau> |
> > > >>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > >>>> <
> > > >>>>
> > > >>
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>>> ---------- Forwarded message ---------
> > > >>>> De : <ge...@apache.org>
> > > >>>> Date: jeu. 4 juin 2020 à 22:57
> > > >>>> Subject: [openwebbeans] branch master updated: adding a test for
> > > testing
> > > >>>> the Typed annotation with wrong value
> > > >>>> To: commits@openwebbeans.apache.org <
> > commits@openwebbeans.apache.org>
> > > >>>>
> > > >>>>
> > > >>>> This is an automated email from the ASF dual-hosted git
> repository.
> > > >>>>
> > > >>>> gerdogdu pushed a commit to branch master
> > > >>>> in repository
> https://gitbox.apache.org/repos/asf/openwebbeans.git
> > > >>>>
> > > >>>>
> > > >>>> The following commit(s) were added to refs/heads/master by this
> > push:
> > > >>>>     new 6de6f20  adding a test for testing the Typed annotation
> with
> > > >>>> wrong
> > > >>>> value
> > > >>>> 6de6f20 is described below
> > > >>>>
> > > >>>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> > > >>>> Author: Gurkan Erdogdu <cg...@gmail.com>
> > > >>>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
> > > >>>>
> > > >>>>    adding a test for testing the Typed annotation with wrong value
> > > >>>> ---
> > > >>>> .../webbeans/test/injection/typed/NotInTyped.java  | 26
> > > >> +++++++++++++++++
> > > >>>> .../test/injection/typed/NotInTypedTest.java       | 34
> > > >>>> ++++++++++++++++++++++
> > > >>>> 2 files changed, 60 insertions(+)
> > > >>>>
> > > >>>> diff --git
> > > >>>>
> > > >>>>
> > > >>
> > >
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > >>>>
> > > >>>>
> > > >>
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > >>>> new file mode 100644
> > > >>>> index 0000000..d5d265e
> > > >>>> --- /dev/null
> > > >>>> +++
> > > >>>>
> > > >>>>
> > > >>
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > > >>>> @@ -0,0 +1,26 @@
> > > >>>> +/*
> > > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > > >>>> + * or more contributor license agreements.  See the NOTICE file
> > > >>>> + * distributed with this work for additional information
> > > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > > >>>> + * to you under the Apache License, Version 2.0 (the
> > > >>>> + * "License"); you may not use this file except in compliance
> > > >>>> + * with the License.  You may obtain a copy of the License at
> > > >>>> + *
> > > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > > >>>> + *
> > > >>>> + * Unless required by applicable law or agreed to in writing,
> > > >>>> + * software distributed under the License is distributed on an
> > > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > > >>>> + * KIND, either express or implied.  See the License for the
> > > >>>> + * specific language governing permissions and limitations
> > > >>>> + * under the License.
> > > >>>> + */
> > > >>>> +package org.apache.webbeans.test.injection.typed;
> > > >>>> +
> > > >>>> +import javax.enterprise.inject.Typed;
> > > >>>> +
> > > >>>> +@Typed(Raven.class)
> > > >>>> +public class NotInTyped implements Bird{
> > > >>>> +
> > > >>>> +}
> > > >>>> diff --git
> > > >>>>
> > > >>>>
> > > >>
> > >
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > >>>>
> > > >>>>
> > > >>
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > >>>> new file mode 100644
> > > >>>> index 0000000..97cbdb3
> > > >>>> --- /dev/null
> > > >>>> +++
> > > >>>>
> > > >>>>
> > > >>
> > >
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > > >>>> @@ -0,0 +1,34 @@
> > > >>>> +/*
> > > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > > >>>> + * or more contributor license agreements.  See the NOTICE file
> > > >>>> + * distributed with this work for additional information
> > > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > > >>>> + * to you under the Apache License, Version 2.0 (the
> > > >>>> + * "License"); you may not use this file except in compliance
> > > >>>> + * with the License.  You may obtain a copy of the License at
> > > >>>> + *
> > > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > > >>>> + *
> > > >>>> + * Unless required by applicable law or agreed to in writing,
> > > >>>> + * software distributed under the License is distributed on an
> > > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > > >>>> + * KIND, either express or implied.  See the License for the
> > > >>>> + * specific language governing permissions and limitations
> > > >>>> + * under the License.
> > > >>>> + */
> > > >>>> +package org.apache.webbeans.test.injection.typed;
> > > >>>> +
> > > >>>> +import
> > org.apache.webbeans.exception.WebBeansConfigurationException;
> > > >>>> +import org.apache.webbeans.test.AbstractUnitTest;
> > > >>>> +import org.junit.Test;
> > > >>>> +
> > > >>>> +public class NotInTypedTest extends AbstractUnitTest
> > > >>>> +{
> > > >>>> +
> > > >>>> +    @Test(expected = WebBeansConfigurationException.class)
> > > >>>> +    public void testNotInTypedMustThrowException()
> > > >>>> +    {
> > > >>>> +        startContainer(Bird.class, Raven.class,
> NotInTyped.class);
> > > >>>> +    }
> > > >>>> +
> > > >>>> +}
> > > >>>>
> > > >>>
> > > >>>
> > > >>> --
> > > >>> Gurkan Erdogdu
> > > >>> http://gurkanerdogdu.blogspot.com
> > > >>>
> > > >>
> > > >>
> > > >> --
> > > >> Gurkan Erdogdu
> > > >> http://gurkanerdogdu.blogspot.com
> > > >>
> > >
> > >
> >
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Gurkan Erdogdu <cg...@gmail.com>.
>
> ..... you basically did nothing for the project until you increase test
> covering - and we are not that bad on that already + it can be hard ot
> review tck
> suite upfront. ....
>
Hey Romain
What do you mean by that? I feel like some yelling :)
I have been a committer and PMC member since founding the project and again
would like to help. Contributions are always welcome for community projects
and the most quick adaptation to the any open source project is starting
with writing tests and even documentation.
As you look at the tests in webbeans-impl, you will see hundreds of tests
which were written by us to well cover the source code. We need to continue
for adding more tests.
Warm regards.
Gurkan


On Fri, Jun 5, 2020 at 1:05 PM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> I'm not fan of that cause we will be really slower, take the time tck
> module runs (it is not fast even if we are faster than most impl) and this
> is what we should duplicate if we respect that paradigm.
> If the "fear" is to loose test with new versions we can have profiles for
> all versions with some excludes when things changed and just run it on
> jenkins, then this makes useful to duplicate anything, no?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le ven. 5 juin 2020 à 11:48, Mark Struberg <st...@yahoo.de.invalid> a
> écrit :
>
> > Well, I'm with Gurkan here. The more tests we have internally the better.
> > TCK tests are fine, but if we move to a new TCK version then we might
> miss
> > something.
> > The TCKs are also not always perfect.
> > We start OWB so fast that it doesn't make much difference.
> >
> > LieGrue,
> > strub
> >
> >
> > > Am 05.06.2020 um 11:39 schrieb Romain Manni-Bucau <
> rmannibucau@gmail.com
> > >:
> > >
> > > Well, it is also bad to x2 the test time cause we duplicated the TCK.
> > > TCK are part of our test coverage and we must consider it as fully part
> > of
> > > our harnessing IMHO, in particular for such simple tests, this is why I
> > > think we shouldnt generalize this practise.
> > >
> > > You last comment also makes me realizing we don't have an onboarding
> page
> > > on our website (we just have
> > https://openwebbeans.apache.org/community.html
> > > right?).
> > > I'm not sure writing a test is welcoming, in particular we our testing
> > > stack.
> > > I also know as a starter it is very frustrating to do so because you
> > > basically did nothing for the project until you increase test covering
> -
> > > and we are not that bad on that already + it can be hard ot review tck
> > > suite upfront. It is also something you can trivially do on your github
> > (or
> > > locally) to play with the project these days.
> > > We should probably try to define some guidelines around how to help.
> > > Out of my head I know doc can be something help would be very welcomed,
> > SPI
> > > doc can be enhanced a lot in particular, ecosystem integrations and doc
> > are
> > > things we can be better (for instance it is not obvious we run on
> > graalvm -
> > > even if there are some limitations). And we should probably flag/tag
> some
> > > jira ticket as "beginner-friendly" (or a better named tag). This
> sounds a
> > > better welcoming path to me, like "contribute something real" and "make
> > the
> > > project move forward".
> > >
> > > wdyt?
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > <
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >
> > >
> > >
> > > Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <cg...@gmail.com>
> a
> > > écrit :
> > >
> > >> One more thing: All new incomers to the project are invited to start
> > with
> > >> adding a simple test like this.
> > >>
> > >> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <
> > cgurkanerdogdu@gmail.com>
> > >> wrote:
> > >>
> > >>> Hey Romain
> > >>> In fact, this is our internal test suite not the TCK. So, it is a
> good
> > >>> idea to have internal tests to cover lots of spec requirements.
> > >>> Regards.
> > >>> Gurkan
> > >>>
> > >>> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <
> > rmannibucau@gmail.com
> > >>>
> > >>> wrote:
> > >>>
> > >>>> For what is worth: this is tested in TCK already
> > >>>> (RestrictedManagedBeanTest I
> > >>>> think) in an user facing way - i e CDI exception, not our internal
> OWB
> > >> one
> > >>>> which does not have to be stable.
> > >>>> Don't know if we need to duplicate it - guess this one is fine cause
> > >> fast
> > >>>> but thought I should mention it.
> > >>>>
> > >>>> Romain Manni-Bucau
> > >>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > >>>> <https://rmannibucau.metawerx.net/> | Old Blog
> > >>>> <http://rmannibucau.wordpress.com> | Github <
> > >>>> https://github.com/rmannibucau> |
> > >>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > >>>> <
> > >>>>
> > >>
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >>>>>
> > >>>>
> > >>>>
> > >>>> ---------- Forwarded message ---------
> > >>>> De : <ge...@apache.org>
> > >>>> Date: jeu. 4 juin 2020 à 22:57
> > >>>> Subject: [openwebbeans] branch master updated: adding a test for
> > testing
> > >>>> the Typed annotation with wrong value
> > >>>> To: commits@openwebbeans.apache.org <
> commits@openwebbeans.apache.org>
> > >>>>
> > >>>>
> > >>>> This is an automated email from the ASF dual-hosted git repository.
> > >>>>
> > >>>> gerdogdu pushed a commit to branch master
> > >>>> in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
> > >>>>
> > >>>>
> > >>>> The following commit(s) were added to refs/heads/master by this
> push:
> > >>>>     new 6de6f20  adding a test for testing the Typed annotation with
> > >>>> wrong
> > >>>> value
> > >>>> 6de6f20 is described below
> > >>>>
> > >>>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> > >>>> Author: Gurkan Erdogdu <cg...@gmail.com>
> > >>>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
> > >>>>
> > >>>>    adding a test for testing the Typed annotation with wrong value
> > >>>> ---
> > >>>> .../webbeans/test/injection/typed/NotInTyped.java  | 26
> > >> +++++++++++++++++
> > >>>> .../test/injection/typed/NotInTypedTest.java       | 34
> > >>>> ++++++++++++++++++++++
> > >>>> 2 files changed, 60 insertions(+)
> > >>>>
> > >>>> diff --git
> > >>>>
> > >>>>
> > >>
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > >>>>
> > >>>>
> > >>
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > >>>> new file mode 100644
> > >>>> index 0000000..d5d265e
> > >>>> --- /dev/null
> > >>>> +++
> > >>>>
> > >>>>
> > >>
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> > >>>> @@ -0,0 +1,26 @@
> > >>>> +/*
> > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > >>>> + * or more contributor license agreements.  See the NOTICE file
> > >>>> + * distributed with this work for additional information
> > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > >>>> + * to you under the Apache License, Version 2.0 (the
> > >>>> + * "License"); you may not use this file except in compliance
> > >>>> + * with the License.  You may obtain a copy of the License at
> > >>>> + *
> > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > >>>> + *
> > >>>> + * Unless required by applicable law or agreed to in writing,
> > >>>> + * software distributed under the License is distributed on an
> > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > >>>> + * KIND, either express or implied.  See the License for the
> > >>>> + * specific language governing permissions and limitations
> > >>>> + * under the License.
> > >>>> + */
> > >>>> +package org.apache.webbeans.test.injection.typed;
> > >>>> +
> > >>>> +import javax.enterprise.inject.Typed;
> > >>>> +
> > >>>> +@Typed(Raven.class)
> > >>>> +public class NotInTyped implements Bird{
> > >>>> +
> > >>>> +}
> > >>>> diff --git
> > >>>>
> > >>>>
> > >>
> >
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > >>>>
> > >>>>
> > >>
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > >>>> new file mode 100644
> > >>>> index 0000000..97cbdb3
> > >>>> --- /dev/null
> > >>>> +++
> > >>>>
> > >>>>
> > >>
> >
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> > >>>> @@ -0,0 +1,34 @@
> > >>>> +/*
> > >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> > >>>> + * or more contributor license agreements.  See the NOTICE file
> > >>>> + * distributed with this work for additional information
> > >>>> + * regarding copyright ownership.  The ASF licenses this file
> > >>>> + * to you under the Apache License, Version 2.0 (the
> > >>>> + * "License"); you may not use this file except in compliance
> > >>>> + * with the License.  You may obtain a copy of the License at
> > >>>> + *
> > >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> > >>>> + *
> > >>>> + * Unless required by applicable law or agreed to in writing,
> > >>>> + * software distributed under the License is distributed on an
> > >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > >>>> + * KIND, either express or implied.  See the License for the
> > >>>> + * specific language governing permissions and limitations
> > >>>> + * under the License.
> > >>>> + */
> > >>>> +package org.apache.webbeans.test.injection.typed;
> > >>>> +
> > >>>> +import
> org.apache.webbeans.exception.WebBeansConfigurationException;
> > >>>> +import org.apache.webbeans.test.AbstractUnitTest;
> > >>>> +import org.junit.Test;
> > >>>> +
> > >>>> +public class NotInTypedTest extends AbstractUnitTest
> > >>>> +{
> > >>>> +
> > >>>> +    @Test(expected = WebBeansConfigurationException.class)
> > >>>> +    public void testNotInTypedMustThrowException()
> > >>>> +    {
> > >>>> +        startContainer(Bird.class, Raven.class, NotInTyped.class);
> > >>>> +    }
> > >>>> +
> > >>>> +}
> > >>>>
> > >>>
> > >>>
> > >>> --
> > >>> Gurkan Erdogdu
> > >>> http://gurkanerdogdu.blogspot.com
> > >>>
> > >>
> > >>
> > >> --
> > >> Gurkan Erdogdu
> > >> http://gurkanerdogdu.blogspot.com
> > >>
> >
> >
>


-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I'm not fan of that cause we will be really slower, take the time tck
module runs (it is not fast even if we are faster than most impl) and this
is what we should duplicate if we respect that paradigm.
If the "fear" is to loose test with new versions we can have profiles for
all versions with some excludes when things changed and just run it on
jenkins, then this makes useful to duplicate anything, no?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 5 juin 2020 à 11:48, Mark Struberg <st...@yahoo.de.invalid> a
écrit :

> Well, I'm with Gurkan here. The more tests we have internally the better.
> TCK tests are fine, but if we move to a new TCK version then we might miss
> something.
> The TCKs are also not always perfect.
> We start OWB so fast that it doesn't make much difference.
>
> LieGrue,
> strub
>
>
> > Am 05.06.2020 um 11:39 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >
> > Well, it is also bad to x2 the test time cause we duplicated the TCK.
> > TCK are part of our test coverage and we must consider it as fully part
> of
> > our harnessing IMHO, in particular for such simple tests, this is why I
> > think we shouldnt generalize this practise.
> >
> > You last comment also makes me realizing we don't have an onboarding page
> > on our website (we just have
> https://openwebbeans.apache.org/community.html
> > right?).
> > I'm not sure writing a test is welcoming, in particular we our testing
> > stack.
> > I also know as a starter it is very frustrating to do so because you
> > basically did nothing for the project until you increase test covering -
> > and we are not that bad on that already + it can be hard ot review tck
> > suite upfront. It is also something you can trivially do on your github
> (or
> > locally) to play with the project these days.
> > We should probably try to define some guidelines around how to help.
> > Out of my head I know doc can be something help would be very welcomed,
> SPI
> > doc can be enhanced a lot in particular, ecosystem integrations and doc
> are
> > things we can be better (for instance it is not obvious we run on
> graalvm -
> > even if there are some limitations). And we should probably flag/tag some
> > jira ticket as "beginner-friendly" (or a better named tag). This sounds a
> > better welcoming path to me, like "contribute something real" and "make
> the
> > project move forward".
> >
> > wdyt?
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <cg...@gmail.com> a
> > écrit :
> >
> >> One more thing: All new incomers to the project are invited to start
> with
> >> adding a simple test like this.
> >>
> >> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <
> cgurkanerdogdu@gmail.com>
> >> wrote:
> >>
> >>> Hey Romain
> >>> In fact, this is our internal test suite not the TCK. So, it is a good
> >>> idea to have internal tests to cover lots of spec requirements.
> >>> Regards.
> >>> Gurkan
> >>>
> >>> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <
> rmannibucau@gmail.com
> >>>
> >>> wrote:
> >>>
> >>>> For what is worth: this is tested in TCK already
> >>>> (RestrictedManagedBeanTest I
> >>>> think) in an user facing way - i e CDI exception, not our internal OWB
> >> one
> >>>> which does not have to be stable.
> >>>> Don't know if we need to duplicate it - guess this one is fine cause
> >> fast
> >>>> but thought I should mention it.
> >>>>
> >>>> Romain Manni-Bucau
> >>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>>> <https://rmannibucau.metawerx.net/> | Old Blog
> >>>> <http://rmannibucau.wordpress.com> | Github <
> >>>> https://github.com/rmannibucau> |
> >>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> >>>> <
> >>>>
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >>>>>
> >>>>
> >>>>
> >>>> ---------- Forwarded message ---------
> >>>> De : <ge...@apache.org>
> >>>> Date: jeu. 4 juin 2020 à 22:57
> >>>> Subject: [openwebbeans] branch master updated: adding a test for
> testing
> >>>> the Typed annotation with wrong value
> >>>> To: commits@openwebbeans.apache.org <co...@openwebbeans.apache.org>
> >>>>
> >>>>
> >>>> This is an automated email from the ASF dual-hosted git repository.
> >>>>
> >>>> gerdogdu pushed a commit to branch master
> >>>> in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
> >>>>
> >>>>
> >>>> The following commit(s) were added to refs/heads/master by this push:
> >>>>     new 6de6f20  adding a test for testing the Typed annotation with
> >>>> wrong
> >>>> value
> >>>> 6de6f20 is described below
> >>>>
> >>>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> >>>> Author: Gurkan Erdogdu <cg...@gmail.com>
> >>>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
> >>>>
> >>>>    adding a test for testing the Typed annotation with wrong value
> >>>> ---
> >>>> .../webbeans/test/injection/typed/NotInTyped.java  | 26
> >> +++++++++++++++++
> >>>> .../test/injection/typed/NotInTypedTest.java       | 34
> >>>> ++++++++++++++++++++++
> >>>> 2 files changed, 60 insertions(+)
> >>>>
> >>>> diff --git
> >>>>
> >>>>
> >>
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> >>>>
> >>>>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> >>>> new file mode 100644
> >>>> index 0000000..d5d265e
> >>>> --- /dev/null
> >>>> +++
> >>>>
> >>>>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> >>>> @@ -0,0 +1,26 @@
> >>>> +/*
> >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> >>>> + * or more contributor license agreements.  See the NOTICE file
> >>>> + * distributed with this work for additional information
> >>>> + * regarding copyright ownership.  The ASF licenses this file
> >>>> + * to you under the Apache License, Version 2.0 (the
> >>>> + * "License"); you may not use this file except in compliance
> >>>> + * with the License.  You may obtain a copy of the License at
> >>>> + *
> >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> >>>> + *
> >>>> + * Unless required by applicable law or agreed to in writing,
> >>>> + * software distributed under the License is distributed on an
> >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> >>>> + * KIND, either express or implied.  See the License for the
> >>>> + * specific language governing permissions and limitations
> >>>> + * under the License.
> >>>> + */
> >>>> +package org.apache.webbeans.test.injection.typed;
> >>>> +
> >>>> +import javax.enterprise.inject.Typed;
> >>>> +
> >>>> +@Typed(Raven.class)
> >>>> +public class NotInTyped implements Bird{
> >>>> +
> >>>> +}
> >>>> diff --git
> >>>>
> >>>>
> >>
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> >>>>
> >>>>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> >>>> new file mode 100644
> >>>> index 0000000..97cbdb3
> >>>> --- /dev/null
> >>>> +++
> >>>>
> >>>>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> >>>> @@ -0,0 +1,34 @@
> >>>> +/*
> >>>> + * Licensed to the Apache Software Foundation (ASF) under one
> >>>> + * or more contributor license agreements.  See the NOTICE file
> >>>> + * distributed with this work for additional information
> >>>> + * regarding copyright ownership.  The ASF licenses this file
> >>>> + * to you under the Apache License, Version 2.0 (the
> >>>> + * "License"); you may not use this file except in compliance
> >>>> + * with the License.  You may obtain a copy of the License at
> >>>> + *
> >>>> + * http://www.apache.org/licenses/LICENSE-2.0
> >>>> + *
> >>>> + * Unless required by applicable law or agreed to in writing,
> >>>> + * software distributed under the License is distributed on an
> >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> >>>> + * KIND, either express or implied.  See the License for the
> >>>> + * specific language governing permissions and limitations
> >>>> + * under the License.
> >>>> + */
> >>>> +package org.apache.webbeans.test.injection.typed;
> >>>> +
> >>>> +import org.apache.webbeans.exception.WebBeansConfigurationException;
> >>>> +import org.apache.webbeans.test.AbstractUnitTest;
> >>>> +import org.junit.Test;
> >>>> +
> >>>> +public class NotInTypedTest extends AbstractUnitTest
> >>>> +{
> >>>> +
> >>>> +    @Test(expected = WebBeansConfigurationException.class)
> >>>> +    public void testNotInTypedMustThrowException()
> >>>> +    {
> >>>> +        startContainer(Bird.class, Raven.class, NotInTyped.class);
> >>>> +    }
> >>>> +
> >>>> +}
> >>>>
> >>>
> >>>
> >>> --
> >>> Gurkan Erdogdu
> >>> http://gurkanerdogdu.blogspot.com
> >>>
> >>
> >>
> >> --
> >> Gurkan Erdogdu
> >> http://gurkanerdogdu.blogspot.com
> >>
>
>

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
Well, I'm with Gurkan here. The more tests we have internally the better.
TCK tests are fine, but if we move to a new TCK version then we might miss something.
The TCKs are also not always perfect.
We start OWB so fast that it doesn't make much difference.

LieGrue,
strub


> Am 05.06.2020 um 11:39 schrieb Romain Manni-Bucau <rm...@gmail.com>:
> 
> Well, it is also bad to x2 the test time cause we duplicated the TCK.
> TCK are part of our test coverage and we must consider it as fully part of
> our harnessing IMHO, in particular for such simple tests, this is why I
> think we shouldnt generalize this practise.
> 
> You last comment also makes me realizing we don't have an onboarding page
> on our website (we just have https://openwebbeans.apache.org/community.html
> right?).
> I'm not sure writing a test is welcoming, in particular we our testing
> stack.
> I also know as a starter it is very frustrating to do so because you
> basically did nothing for the project until you increase test covering -
> and we are not that bad on that already + it can be hard ot review tck
> suite upfront. It is also something you can trivially do on your github (or
> locally) to play with the project these days.
> We should probably try to define some guidelines around how to help.
> Out of my head I know doc can be something help would be very welcomed, SPI
> doc can be enhanced a lot in particular, ecosystem integrations and doc are
> things we can be better (for instance it is not obvious we run on graalvm -
> even if there are some limitations). And we should probably flag/tag some
> jira ticket as "beginner-friendly" (or a better named tag). This sounds a
> better welcoming path to me, like "contribute something real" and "make the
> project move forward".
> 
> wdyt?
> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
> 
> 
> Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <cg...@gmail.com> a
> écrit :
> 
>> One more thing: All new incomers to the project are invited to start with
>> adding a simple test like this.
>> 
>> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <cg...@gmail.com>
>> wrote:
>> 
>>> Hey Romain
>>> In fact, this is our internal test suite not the TCK. So, it is a good
>>> idea to have internal tests to cover lots of spec requirements.
>>> Regards.
>>> Gurkan
>>> 
>>> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <rmannibucau@gmail.com
>>> 
>>> wrote:
>>> 
>>>> For what is worth: this is tested in TCK already
>>>> (RestrictedManagedBeanTest I
>>>> think) in an user facing way - i e CDI exception, not our internal OWB
>> one
>>>> which does not have to be stable.
>>>> Don't know if we need to duplicate it - guess this one is fine cause
>> fast
>>>> but thought I should mention it.
>>>> 
>>>> Romain Manni-Bucau
>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>> <https://rmannibucau.metawerx.net/> | Old Blog
>>>> <http://rmannibucau.wordpress.com> | Github <
>>>> https://github.com/rmannibucau> |
>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
>>>> <
>>>> 
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>>>>> 
>>>> 
>>>> 
>>>> ---------- Forwarded message ---------
>>>> De : <ge...@apache.org>
>>>> Date: jeu. 4 juin 2020 à 22:57
>>>> Subject: [openwebbeans] branch master updated: adding a test for testing
>>>> the Typed annotation with wrong value
>>>> To: commits@openwebbeans.apache.org <co...@openwebbeans.apache.org>
>>>> 
>>>> 
>>>> This is an automated email from the ASF dual-hosted git repository.
>>>> 
>>>> gerdogdu pushed a commit to branch master
>>>> in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
>>>> 
>>>> 
>>>> The following commit(s) were added to refs/heads/master by this push:
>>>>     new 6de6f20  adding a test for testing the Typed annotation with
>>>> wrong
>>>> value
>>>> 6de6f20 is described below
>>>> 
>>>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
>>>> Author: Gurkan Erdogdu <cg...@gmail.com>
>>>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
>>>> 
>>>>    adding a test for testing the Typed annotation with wrong value
>>>> ---
>>>> .../webbeans/test/injection/typed/NotInTyped.java  | 26
>> +++++++++++++++++
>>>> .../test/injection/typed/NotInTypedTest.java       | 34
>>>> ++++++++++++++++++++++
>>>> 2 files changed, 60 insertions(+)
>>>> 
>>>> diff --git
>>>> 
>>>> 
>> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>>>> 
>>>> 
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>>>> new file mode 100644
>>>> index 0000000..d5d265e
>>>> --- /dev/null
>>>> +++
>>>> 
>>>> 
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>>>> @@ -0,0 +1,26 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one
>>>> + * or more contributor license agreements.  See the NOTICE file
>>>> + * distributed with this work for additional information
>>>> + * regarding copyright ownership.  The ASF licenses this file
>>>> + * to you under the Apache License, Version 2.0 (the
>>>> + * "License"); you may not use this file except in compliance
>>>> + * with the License.  You may obtain a copy of the License at
>>>> + *
>>>> + * http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing,
>>>> + * software distributed under the License is distributed on an
>>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>>>> + * KIND, either express or implied.  See the License for the
>>>> + * specific language governing permissions and limitations
>>>> + * under the License.
>>>> + */
>>>> +package org.apache.webbeans.test.injection.typed;
>>>> +
>>>> +import javax.enterprise.inject.Typed;
>>>> +
>>>> +@Typed(Raven.class)
>>>> +public class NotInTyped implements Bird{
>>>> +
>>>> +}
>>>> diff --git
>>>> 
>>>> 
>> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>>>> 
>>>> 
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>>>> new file mode 100644
>>>> index 0000000..97cbdb3
>>>> --- /dev/null
>>>> +++
>>>> 
>>>> 
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>>>> @@ -0,0 +1,34 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one
>>>> + * or more contributor license agreements.  See the NOTICE file
>>>> + * distributed with this work for additional information
>>>> + * regarding copyright ownership.  The ASF licenses this file
>>>> + * to you under the Apache License, Version 2.0 (the
>>>> + * "License"); you may not use this file except in compliance
>>>> + * with the License.  You may obtain a copy of the License at
>>>> + *
>>>> + * http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing,
>>>> + * software distributed under the License is distributed on an
>>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>>>> + * KIND, either express or implied.  See the License for the
>>>> + * specific language governing permissions and limitations
>>>> + * under the License.
>>>> + */
>>>> +package org.apache.webbeans.test.injection.typed;
>>>> +
>>>> +import org.apache.webbeans.exception.WebBeansConfigurationException;
>>>> +import org.apache.webbeans.test.AbstractUnitTest;
>>>> +import org.junit.Test;
>>>> +
>>>> +public class NotInTypedTest extends AbstractUnitTest
>>>> +{
>>>> +
>>>> +    @Test(expected = WebBeansConfigurationException.class)
>>>> +    public void testNotInTypedMustThrowException()
>>>> +    {
>>>> +        startContainer(Bird.class, Raven.class, NotInTyped.class);
>>>> +    }
>>>> +
>>>> +}
>>>> 
>>> 
>>> 
>>> --
>>> Gurkan Erdogdu
>>> http://gurkanerdogdu.blogspot.com
>>> 
>> 
>> 
>> --
>> Gurkan Erdogdu
>> http://gurkanerdogdu.blogspot.com
>> 


Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Well, it is also bad to x2 the test time cause we duplicated the TCK.
TCK are part of our test coverage and we must consider it as fully part of
our harnessing IMHO, in particular for such simple tests, this is why I
think we shouldnt generalize this practise.

You last comment also makes me realizing we don't have an onboarding page
on our website (we just have https://openwebbeans.apache.org/community.html
 right?).
I'm not sure writing a test is welcoming, in particular we our testing
stack.
I also know as a starter it is very frustrating to do so because you
basically did nothing for the project until you increase test covering -
and we are not that bad on that already + it can be hard ot review tck
suite upfront. It is also something you can trivially do on your github (or
locally) to play with the project these days.
We should probably try to define some guidelines around how to help.
Out of my head I know doc can be something help would be very welcomed, SPI
doc can be enhanced a lot in particular, ecosystem integrations and doc are
things we can be better (for instance it is not obvious we run on graalvm -
even if there are some limitations). And we should probably flag/tag some
jira ticket as "beginner-friendly" (or a better named tag). This sounds a
better welcoming path to me, like "contribute something real" and "make the
project move forward".

wdyt?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 5 juin 2020 à 10:38, Gurkan Erdogdu <cg...@gmail.com> a
écrit :

> One more thing: All new incomers to the project are invited to start with
> adding a simple test like this.
>
> On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <cg...@gmail.com>
> wrote:
>
> > Hey Romain
> > In fact, this is our internal test suite not the TCK. So, it is a good
> > idea to have internal tests to cover lots of spec requirements.
> > Regards.
> > Gurkan
> >
> > On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <rmannibucau@gmail.com
> >
> > wrote:
> >
> >> For what is worth: this is tested in TCK already
> >> (RestrictedManagedBeanTest I
> >> think) in an user facing way - i e CDI exception, not our internal OWB
> one
> >> which does not have to be stable.
> >> Don't know if we need to duplicate it - guess this one is fine cause
> fast
> >> but thought I should mention it.
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >> <https://rmannibucau.metawerx.net/> | Old Blog
> >> <http://rmannibucau.wordpress.com> | Github <
> >> https://github.com/rmannibucau> |
> >> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> >> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >> >
> >>
> >>
> >> ---------- Forwarded message ---------
> >> De : <ge...@apache.org>
> >> Date: jeu. 4 juin 2020 à 22:57
> >> Subject: [openwebbeans] branch master updated: adding a test for testing
> >> the Typed annotation with wrong value
> >> To: commits@openwebbeans.apache.org <co...@openwebbeans.apache.org>
> >>
> >>
> >> This is an automated email from the ASF dual-hosted git repository.
> >>
> >> gerdogdu pushed a commit to branch master
> >> in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
> >>
> >>
> >> The following commit(s) were added to refs/heads/master by this push:
> >>      new 6de6f20  adding a test for testing the Typed annotation with
> >> wrong
> >> value
> >> 6de6f20 is described below
> >>
> >> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> >> Author: Gurkan Erdogdu <cg...@gmail.com>
> >> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
> >>
> >>     adding a test for testing the Typed annotation with wrong value
> >> ---
> >>  .../webbeans/test/injection/typed/NotInTyped.java  | 26
> +++++++++++++++++
> >>  .../test/injection/typed/NotInTypedTest.java       | 34
> >> ++++++++++++++++++++++
> >>  2 files changed, 60 insertions(+)
> >>
> >> diff --git
> >>
> >>
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> >>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> >> new file mode 100644
> >> index 0000000..d5d265e
> >> --- /dev/null
> >> +++
> >>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> >> @@ -0,0 +1,26 @@
> >> +/*
> >> + * Licensed to the Apache Software Foundation (ASF) under one
> >> + * or more contributor license agreements.  See the NOTICE file
> >> + * distributed with this work for additional information
> >> + * regarding copyright ownership.  The ASF licenses this file
> >> + * to you under the Apache License, Version 2.0 (the
> >> + * "License"); you may not use this file except in compliance
> >> + * with the License.  You may obtain a copy of the License at
> >> + *
> >> + * http://www.apache.org/licenses/LICENSE-2.0
> >> + *
> >> + * Unless required by applicable law or agreed to in writing,
> >> + * software distributed under the License is distributed on an
> >> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> >> + * KIND, either express or implied.  See the License for the
> >> + * specific language governing permissions and limitations
> >> + * under the License.
> >> + */
> >> +package org.apache.webbeans.test.injection.typed;
> >> +
> >> +import javax.enterprise.inject.Typed;
> >> +
> >> +@Typed(Raven.class)
> >> +public class NotInTyped implements Bird{
> >> +
> >> +}
> >> diff --git
> >>
> >>
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> >>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> >> new file mode 100644
> >> index 0000000..97cbdb3
> >> --- /dev/null
> >> +++
> >>
> >>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> >> @@ -0,0 +1,34 @@
> >> +/*
> >> + * Licensed to the Apache Software Foundation (ASF) under one
> >> + * or more contributor license agreements.  See the NOTICE file
> >> + * distributed with this work for additional information
> >> + * regarding copyright ownership.  The ASF licenses this file
> >> + * to you under the Apache License, Version 2.0 (the
> >> + * "License"); you may not use this file except in compliance
> >> + * with the License.  You may obtain a copy of the License at
> >> + *
> >> + * http://www.apache.org/licenses/LICENSE-2.0
> >> + *
> >> + * Unless required by applicable law or agreed to in writing,
> >> + * software distributed under the License is distributed on an
> >> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> >> + * KIND, either express or implied.  See the License for the
> >> + * specific language governing permissions and limitations
> >> + * under the License.
> >> + */
> >> +package org.apache.webbeans.test.injection.typed;
> >> +
> >> +import org.apache.webbeans.exception.WebBeansConfigurationException;
> >> +import org.apache.webbeans.test.AbstractUnitTest;
> >> +import org.junit.Test;
> >> +
> >> +public class NotInTypedTest extends AbstractUnitTest
> >> +{
> >> +
> >> +    @Test(expected = WebBeansConfigurationException.class)
> >> +    public void testNotInTypedMustThrowException()
> >> +    {
> >> +        startContainer(Bird.class, Raven.class, NotInTyped.class);
> >> +    }
> >> +
> >> +}
> >>
> >
> >
> > --
> > Gurkan Erdogdu
> > http://gurkanerdogdu.blogspot.com
> >
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Gurkan Erdogdu <cg...@gmail.com>.
One more thing: All new incomers to the project are invited to start with
adding a simple test like this.

On Fri, Jun 5, 2020 at 11:34 AM Gurkan Erdogdu <cg...@gmail.com>
wrote:

> Hey Romain
> In fact, this is our internal test suite not the TCK. So, it is a good
> idea to have internal tests to cover lots of spec requirements.
> Regards.
> Gurkan
>
> On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
>> For what is worth: this is tested in TCK already
>> (RestrictedManagedBeanTest I
>> think) in an user facing way - i e CDI exception, not our internal OWB one
>> which does not have to be stable.
>> Don't know if we need to duplicate it - guess this one is fine cause fast
>> but thought I should mention it.
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <https://rmannibucau.metawerx.net/> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
>> <
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >
>>
>>
>> ---------- Forwarded message ---------
>> De : <ge...@apache.org>
>> Date: jeu. 4 juin 2020 à 22:57
>> Subject: [openwebbeans] branch master updated: adding a test for testing
>> the Typed annotation with wrong value
>> To: commits@openwebbeans.apache.org <co...@openwebbeans.apache.org>
>>
>>
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> gerdogdu pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
>>
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>      new 6de6f20  adding a test for testing the Typed annotation with
>> wrong
>> value
>> 6de6f20 is described below
>>
>> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
>> Author: Gurkan Erdogdu <cg...@gmail.com>
>> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
>>
>>     adding a test for testing the Typed annotation with wrong value
>> ---
>>  .../webbeans/test/injection/typed/NotInTyped.java  | 26 +++++++++++++++++
>>  .../test/injection/typed/NotInTypedTest.java       | 34
>> ++++++++++++++++++++++
>>  2 files changed, 60 insertions(+)
>>
>> diff --git
>>
>> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>>
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>> new file mode 100644
>> index 0000000..d5d265e
>> --- /dev/null
>> +++
>>
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>> @@ -0,0 +1,26 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one
>> + * or more contributor license agreements.  See the NOTICE file
>> + * distributed with this work for additional information
>> + * regarding copyright ownership.  The ASF licenses this file
>> + * to you under the Apache License, Version 2.0 (the
>> + * "License"); you may not use this file except in compliance
>> + * with the License.  You may obtain a copy of the License at
>> + *
>> + * http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing,
>> + * software distributed under the License is distributed on an
>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>> + * KIND, either express or implied.  See the License for the
>> + * specific language governing permissions and limitations
>> + * under the License.
>> + */
>> +package org.apache.webbeans.test.injection.typed;
>> +
>> +import javax.enterprise.inject.Typed;
>> +
>> +@Typed(Raven.class)
>> +public class NotInTyped implements Bird{
>> +
>> +}
>> diff --git
>>
>> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>>
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>> new file mode 100644
>> index 0000000..97cbdb3
>> --- /dev/null
>> +++
>>
>> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>> @@ -0,0 +1,34 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one
>> + * or more contributor license agreements.  See the NOTICE file
>> + * distributed with this work for additional information
>> + * regarding copyright ownership.  The ASF licenses this file
>> + * to you under the Apache License, Version 2.0 (the
>> + * "License"); you may not use this file except in compliance
>> + * with the License.  You may obtain a copy of the License at
>> + *
>> + * http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing,
>> + * software distributed under the License is distributed on an
>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>> + * KIND, either express or implied.  See the License for the
>> + * specific language governing permissions and limitations
>> + * under the License.
>> + */
>> +package org.apache.webbeans.test.injection.typed;
>> +
>> +import org.apache.webbeans.exception.WebBeansConfigurationException;
>> +import org.apache.webbeans.test.AbstractUnitTest;
>> +import org.junit.Test;
>> +
>> +public class NotInTypedTest extends AbstractUnitTest
>> +{
>> +
>> +    @Test(expected = WebBeansConfigurationException.class)
>> +    public void testNotInTypedMustThrowException()
>> +    {
>> +        startContainer(Bird.class, Raven.class, NotInTyped.class);
>> +    }
>> +
>> +}
>>
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>


-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Re: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Gurkan Erdogdu <cg...@gmail.com>.
Hey Romain
In fact, this is our internal test suite not the TCK. So, it is a good idea
to have internal tests to cover lots of spec requirements.
Regards.
Gurkan

On Fri, Jun 5, 2020 at 8:52 AM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> For what is worth: this is tested in TCK already
> (RestrictedManagedBeanTest I
> think) in an user facing way - i e CDI exception, not our internal OWB one
> which does not have to be stable.
> Don't know if we need to duplicate it - guess this one is fine cause fast
> but thought I should mention it.
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> ---------- Forwarded message ---------
> De : <ge...@apache.org>
> Date: jeu. 4 juin 2020 à 22:57
> Subject: [openwebbeans] branch master updated: adding a test for testing
> the Typed annotation with wrong value
> To: commits@openwebbeans.apache.org <co...@openwebbeans.apache.org>
>
>
> This is an automated email from the ASF dual-hosted git repository.
>
> gerdogdu pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>      new 6de6f20  adding a test for testing the Typed annotation with wrong
> value
> 6de6f20 is described below
>
> commit 6de6f200f0817fc8028017800e5fdcf490496a9a
> Author: Gurkan Erdogdu <cg...@gmail.com>
> AuthorDate: Thu Jun 4 23:57:26 2020 +0300
>
>     adding a test for testing the Typed annotation with wrong value
> ---
>  .../webbeans/test/injection/typed/NotInTyped.java  | 26 +++++++++++++++++
>  .../test/injection/typed/NotInTypedTest.java       | 34
> ++++++++++++++++++++++
>  2 files changed, 60 insertions(+)
>
> diff --git
>
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> new file mode 100644
> index 0000000..d5d265e
> --- /dev/null
> +++
>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
> @@ -0,0 +1,26 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.webbeans.test.injection.typed;
> +
> +import javax.enterprise.inject.Typed;
> +
> +@Typed(Raven.class)
> +public class NotInTyped implements Bird{
> +
> +}
> diff --git
>
> a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> new file mode 100644
> index 0000000..97cbdb3
> --- /dev/null
> +++
>
> b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
> @@ -0,0 +1,34 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.webbeans.test.injection.typed;
> +
> +import org.apache.webbeans.exception.WebBeansConfigurationException;
> +import org.apache.webbeans.test.AbstractUnitTest;
> +import org.junit.Test;
> +
> +public class NotInTypedTest extends AbstractUnitTest
> +{
> +
> +    @Test(expected = WebBeansConfigurationException.class)
> +    public void testNotInTypedMustThrowException()
> +    {
> +        startContainer(Bird.class, Raven.class, NotInTyped.class);
> +    }
> +
> +}
>


-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Fwd: [openwebbeans] branch master updated: adding a test for testing the Typed annotation with wrong value

Posted by Romain Manni-Bucau <rm...@gmail.com>.
For what is worth: this is tested in TCK already (RestrictedManagedBeanTest I
think) in an user facing way - i e CDI exception, not our internal OWB one
which does not have to be stable.
Don't know if we need to duplicate it - guess this one is fine cause fast
but thought I should mention it.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


---------- Forwarded message ---------
De : <ge...@apache.org>
Date: jeu. 4 juin 2020 à 22:57
Subject: [openwebbeans] branch master updated: adding a test for testing
the Typed annotation with wrong value
To: commits@openwebbeans.apache.org <co...@openwebbeans.apache.org>


This is an automated email from the ASF dual-hosted git repository.

gerdogdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 6de6f20  adding a test for testing the Typed annotation with wrong
value
6de6f20 is described below

commit 6de6f200f0817fc8028017800e5fdcf490496a9a
Author: Gurkan Erdogdu <cg...@gmail.com>
AuthorDate: Thu Jun 4 23:57:26 2020 +0300

    adding a test for testing the Typed annotation with wrong value
---
 .../webbeans/test/injection/typed/NotInTyped.java  | 26 +++++++++++++++++
 .../test/injection/typed/NotInTypedTest.java       | 34
++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git
a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
new file mode 100644
index 0000000..d5d265e
--- /dev/null
+++
b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTyped.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.test.injection.typed;
+
+import javax.enterprise.inject.Typed;
+
+@Typed(Raven.class)
+public class NotInTyped implements Bird{
+
+}
diff --git
a/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
new file mode 100644
index 0000000..97cbdb3
--- /dev/null
+++
b/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/typed/NotInTypedTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.test.injection.typed;
+
+import org.apache.webbeans.exception.WebBeansConfigurationException;
+import org.apache.webbeans.test.AbstractUnitTest;
+import org.junit.Test;
+
+public class NotInTypedTest extends AbstractUnitTest
+{
+
+    @Test(expected = WebBeansConfigurationException.class)
+    public void testNotInTypedMustThrowException()
+    {
+        startContainer(Bird.class, Raven.class, NotInTyped.class);
+    }
+
+}