Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7159289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:12:22+00:00 2026-05-28T13:12:22+00:00

So i have a small integration test that houses 5 tests in total. Running

  • 0

So i have a small integration test that houses 5 tests in total. Running that test exclusively results in all tests passed. However running my entire test suite results in 4 test failures of the 5.

I’ve just recently upgraded to grails-2.0 from 1.3.7 and i switched from hsqldb to h2.

Has anyone any pointers in which direction i should be looking in order to fix this (test-pollution) problem?

Domain model

domain-model

Integration test:

class SeriesIntegrationTests extends GrailsUnitTestCase {
    Series series
    Episode episode

    protected void setUp() {
        super.setUp()
        series = new Series(ttdbId: 2348);
        episode = new Episode(ttdbId: 2983, season: 0, episodeNumber: 0, series: series);
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testCreateSeries() {
        series.save()
        assertFalse("should not have validation errors : $series.errors", series.hasErrors())
        assertEquals("should be one series stored in db", 1, Series.count())
    }

    void testCreateEpisode() {
        series.save()
        episode.save()
        assertFalse("should not have validation errors : $episode.errors", episode.hasErrors())
        assertEquals("should be one episode stored in db", 1, Episode.count())
    }

    void testCreateSeriesAndAddEpisode() {
        series.addToEpisodes(episode)
        series.save(flush: true)
        series.refresh()
        assertEquals("series should contain one episode", 1, series.episodes.size())
    }

    void testDeleteSeriesAndCascadeToEpisode() {
        series.addToEpisodes(episode)
        series.save(flush: true)
        series.delete(flush: true)
        assertEquals(0, Episode.count())
        assertEquals(0, Series.count())

    }

    void testDeleteSeriesAndCascadeToBackdropImage() {
        series.backdrop = new Image();
        series.backdrop.binaryData = new byte[0]
        series.save(flush: true)

        assertFalse(series.hasErrors())
        assertEquals(1, Image.count())

        series.delete(flush: true)
        assertEquals(0, Image.count())
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:12:23+00:00Added an answer on May 28, 2026 at 1:12 pm

    My solution as to upgrade all the unit tests to grails 2.0 method of doing tests. When this was done, every test passed. So it seem’s that unit tests somehow polluted integration tests. But only on certain hardware configurations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have small function that running on condintion, if text box value is not
I have a small ASP.NET web application hosted in an integration test (executing within
I have small test app: Socket socket = new Socket(jeck.ru, 80); PrintWriter pw =
I have small web app that generate PDF files as a report. I'm trying
The title pretty much says it all. I have a project that for political
We have a number of small projects within our system running on Linux (Slackware
If a project has 100% unit test coverage, are integration tests still needed? I
For my work I have to develop a small Java application that parses very
I have a small Spring app that reads a few databases, and writes a
I have a small command-line application (about 6k lines). It has no unit tests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.