Skip to content

Conversation

@vanzin
Copy link
Contributor

@vanzin vanzin commented May 30, 2014

  • JavaAPISuite was trying to compare a bare path with a URI. Fix by
    extracting the path from the URI, since we know it should be a
    local path anyway/
  • b9be160 excluded the ASM dependency everywhere, but easymock needs
    it (because cglib needs it). So re-add the dependency, with test
    scope this time.

The second one above actually uncovered a weird situation: the maven
test target works, even though I can't find the class sbt complains
about in its classpath. sbt complains with:

[error] Uncaught exception when running org.apache.spark.util
.random.RandomSamplerSuite: java.lang.NoClassDefFoundError:
org/objectweb/asm/Type

To avoid more weirdness caused by that, I explicitly added the asm
dependency to both maven and sbt (for tests only), and verified
the classes don't end up in the final assembly.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@vanzin
Copy link
Contributor Author

vanzin commented May 30, 2014

BTW I have a different version of the fix that changes RandomSamplerSuite / CacheManagerSuite to use mockito instead of easymock. Mockito doesn't seem to suffer from the issue I ran into.

Let me know if you prefer that.

@vanzin
Copy link
Contributor Author

vanzin commented Jun 6, 2014

Ping.

@vanzin
Copy link
Contributor Author

vanzin commented Jun 18, 2014

Another friendly ping. Could I get some eyes on this change? It's pretty trivial.

@srowen
Copy link
Member

srowen commented Jun 19, 2014

(Looks like this needs a rebase?)

- JavaAPISuite was trying to compare a bare path with a URI. Fix by
  extracting the path from the URI, since we know it should be a
  local path anyway/

- b9be160 excluded the ASM dependency everywhere, but easymock needs
  it (because cglib needs it). So re-add the dependency, with test
  scope this time.

The second one above actually uncovered a weird situation: the maven
test target works, even though I can't find the class sbt complains
about in its classpath. sbt complains with:

  [error] Uncaught exception when running org.apache.spark.util
  .random.RandomSamplerSuite: java.lang.NoClassDefFoundError:
  org/objectweb/asm/Type

To avoid more weirdness caused by that, I explicitly added the asm
dependency to both maven and sbt (for tests only), and verified
the classes don't end up in the final assembly.
@pwendell
Copy link
Contributor

Jenkins, test this please. Thanks for this - I wanted to get a build matrix setup in jenkins before looking at fixes for tests. Indeed, our tests do not work currently for several parameterizations of our builds, which is very bad.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15974/

@asfgit asfgit closed this in 648553d Jun 21, 2014
@vanzin vanzin deleted the flaky-tests branch June 23, 2014 19:53
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
- JavaAPISuite was trying to compare a bare path with a URI. Fix by
  extracting the path from the URI, since we know it should be a
  local path anyway/

- b9be160 excluded the ASM dependency everywhere, but easymock needs
  it (because cglib needs it). So re-add the dependency, with test
  scope this time.

The second one above actually uncovered a weird situation: the maven
test target works, even though I can't find the class sbt complains
about in its classpath. sbt complains with:

  [error] Uncaught exception when running org.apache.spark.util
  .random.RandomSamplerSuite: java.lang.NoClassDefFoundError:
  org/objectweb/asm/Type

To avoid more weirdness caused by that, I explicitly added the asm
dependency to both maven and sbt (for tests only), and verified
the classes don't end up in the final assembly.

Author: Marcelo Vanzin <[email protected]>

Closes apache#917 from vanzin/flaky-tests and squashes the following commits:

d022320 [Marcelo Vanzin] Fix some tests.
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
- JavaAPISuite was trying to compare a bare path with a URI. Fix by
  extracting the path from the URI, since we know it should be a
  local path anyway/

- b9be160 excluded the ASM dependency everywhere, but easymock needs
  it (because cglib needs it). So re-add the dependency, with test
  scope this time.

The second one above actually uncovered a weird situation: the maven
test target works, even though I can't find the class sbt complains
about in its classpath. sbt complains with:

  [error] Uncaught exception when running org.apache.spark.util
  .random.RandomSamplerSuite: java.lang.NoClassDefFoundError:
  org/objectweb/asm/Type

To avoid more weirdness caused by that, I explicitly added the asm
dependency to both maven and sbt (for tests only), and verified
the classes don't end up in the final assembly.

Author: Marcelo Vanzin <[email protected]>

Closes apache#917 from vanzin/flaky-tests and squashes the following commits:

d022320 [Marcelo Vanzin] Fix some tests.
agirish pushed a commit to HPEEzmeral/apache-spark that referenced this pull request May 5, 2022
udaynpusa pushed a commit to mapr/spark that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants